Changeset 259541 in webkit


Ignore:
Timestamp:
Apr 4, 2020, 5:42:02 PM (5 years ago)
Author:
Wenson Hsieh
Message:

Add a fourth round of logging to help diagnose <webkit.org/b/209685>
https://bugs.webkit.org/show_bug.cgi?id=210011

Reviewed by Darin Adler.

Source/WebCore:

Augment logging in WebItemProviderPasteboard to additionally dump a backtrace when registering item providers
when initiating a drag on iOS. Logging thus far suggests that this is due to an IPC dispatch race when sending
the following messages to the UI process: WebPasteboardProxy::writeCustomData and
WebPasteboardProxy::writeStringToPasteboard. While writeCustomData is dispatched synchronously,
writeStringToPasteboard is dispatched asynchronously; this means that it is possible for the call to
writeCustomData to be dispatched before writeStringToPasteboard even if the web process sends the
writeCustomData message later, due to the UI-process-side mechanism for immediately dispatching incoming sync
IPC if it is currently processing sync IPC itself.

A backtrace here should help to confirm this theory.

  • platform/ios/WebItemProviderPasteboard.mm:

(-[WebItemProviderPasteboard stageRegistrationLists:]):

Source/WebKit:

Remove all logging previously added to WKContentView and DragDropInteractionState.

  • UIProcess/ios/DragDropInteractionState.mm:

(WebKit::DragDropInteractionState::stageDragItem):
(WebKit::DragDropInteractionState::clearStagedDragSource):

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView _didHandleDragStartRequest:]):

Tools:

Remove all logging previously added to DragAndDropSimulator.

  • TestWebKitAPI/ios/DragAndDropSimulatorIOS.mm:

(-[DragAndDropSimulator _webView:adjustedDataInteractionItemProvidersForItemProvider:representingObjects:additionalData:]):

Location:
trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r259538 r259541  
     12020-04-04  Wenson Hsieh  <wenson_hsieh@apple.com>
     2
     3        Add a fourth round of logging to help diagnose <webkit.org/b/209685>
     4        https://bugs.webkit.org/show_bug.cgi?id=210011
     5
     6        Reviewed by Darin Adler.
     7
     8        Augment logging in WebItemProviderPasteboard to additionally dump a backtrace when registering item providers
     9        when initiating a drag on iOS. Logging thus far suggests that this is due to an IPC dispatch race when sending
     10        the following messages to the UI process: `WebPasteboardProxy::writeCustomData` and
     11        `WebPasteboardProxy::writeStringToPasteboard`. While `writeCustomData` is dispatched synchronously,
     12        `writeStringToPasteboard` is dispatched asynchronously; this means that it is possible for the call to
     13        `writeCustomData` to be dispatched before `writeStringToPasteboard` even if the web process sends the
     14        `writeCustomData` message later, due to the UI-process-side mechanism for immediately dispatching incoming sync
     15        IPC if it is currently processing sync IPC itself.
     16
     17        A backtrace here should help to confirm this theory.
     18
     19        * platform/ios/WebItemProviderPasteboard.mm:
     20        (-[WebItemProviderPasteboard stageRegistrationLists:]):
     21
    1222020-04-04  Doug Kelly  <dougk@apple.com>
    223
  • trunk/Source/WebCore/platform/ios/WebItemProviderPasteboard.mm

    r259534 r259541  
    858858    ASSERT(lists.count);
    859859    NSLog(@"%s - %@", __PRETTY_FUNCTION__, lists);
     860    WTFReportBacktrace();
    860861    _stagedRegistrationInfoLists = lists;
    861862}
  • trunk/Source/WebKit/ChangeLog

    r259540 r259541  
     12020-04-04  Wenson Hsieh  <wenson_hsieh@apple.com>
     2
     3        Add a fourth round of logging to help diagnose <webkit.org/b/209685>
     4        https://bugs.webkit.org/show_bug.cgi?id=210011
     5
     6        Reviewed by Darin Adler.
     7
     8        Remove all logging previously added to WKContentView and DragDropInteractionState.
     9
     10        * UIProcess/ios/DragDropInteractionState.mm:
     11        (WebKit::DragDropInteractionState::stageDragItem):
     12        (WebKit::DragDropInteractionState::clearStagedDragSource):
     13        * UIProcess/ios/WKContentViewInteraction.mm:
     14        (-[WKContentView _didHandleDragStartRequest:]):
     15
    1162020-04-04  Chris Dumez  <cdumez@apple.com>
    217
  • trunk/Source/WebKit/UIProcess/ios/DragDropInteractionState.mm

    r259534 r259541  
    340340void DragDropInteractionState::stageDragItem(const DragItem& item, UIImage *dragImage)
    341341{
    342     NSLog(@"%s - source action := %02x", __PRETTY_FUNCTION__, item.sourceAction);
    343342    static NSInteger currentDragSourceItemIdentifier = 0;
    344343
     
    365364void DragDropInteractionState::clearStagedDragSource(DidBecomeActive didBecomeActive)
    366365{
    367     if (m_stagedDragSource)
    368         NSLog(@"%s - source action := %02x", __PRETTY_FUNCTION__, m_stagedDragSource->action);
    369 
    370366    if (didBecomeActive == DidBecomeActive::Yes)
    371367        m_activeDragSources.append(stagedDragSource());
  • trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm

    r259534 r259541  
    70807080    ASSERT(savedCompletionBlock);
    70817081
    7082     NSLog(@"Handling drag start request (started: %d, completion block: %p)", started, savedCompletionBlock.get());
     7082    RELEASE_LOG(DragAndDrop, "Handling drag start request (started: %d, completion block: %p)", started, savedCompletionBlock.get());
    70837083    if (savedCompletionBlock)
    70847084        savedCompletionBlock();
  • trunk/Tools/ChangeLog

    r259540 r259541  
     12020-04-04  Wenson Hsieh  <wenson_hsieh@apple.com>
     2
     3        Add a fourth round of logging to help diagnose <webkit.org/b/209685>
     4        https://bugs.webkit.org/show_bug.cgi?id=210011
     5
     6        Reviewed by Darin Adler.
     7
     8        Remove all logging previously added to DragAndDropSimulator.
     9
     10        * TestWebKitAPI/ios/DragAndDropSimulatorIOS.mm:
     11        (-[DragAndDropSimulator _webView:adjustedDataInteractionItemProvidersForItemProvider:representingObjects:additionalData:]):
     12
    1132020-04-04  Chris Dumez  <cdumez@apple.com>
    214
  • trunk/Tools/TestWebKitAPI/ios/DragAndDropSimulatorIOS.mm

    r259534 r259541  
    608608        NSArray *items = [[_webView dragInteractionDelegate] dragInteraction:[_webView dragInteraction] itemsForBeginningSession:_dragSession.get()];
    609609        if (!items.count) {
    610             NSLog(@"%s (found no drag items when beginning session)", __PRETTY_FUNCTION__);
    611610            _phase = DragAndDropPhaseCancelled;
    612611            _currentProgress = 1;
     
    899898- (NSArray *)_webView:(WKWebView *)webView adjustedDataInteractionItemProvidersForItemProvider:(NSItemProvider *)itemProvider representingObjects:(NSArray *)representingObjects additionalData:(NSDictionary *)additionalData
    900899{
    901     NSLog(@"%s - self.convertItemProvidersBlock := %p; itemProvider.registeredTypeIdentifiers := %@", __PRETTY_FUNCTION__, self.convertItemProvidersBlock, itemProvider.registeredTypeIdentifiers);
    902900    return self.convertItemProvidersBlock ? self.convertItemProvidersBlock(itemProvider, representingObjects, additionalData) : @[ itemProvider ];
    903901}
Note: See TracChangeset for help on using the changeset viewer.