Title: [259541] trunk
Revision
259541
Author
[email protected]
Date
2020-04-04 17:42:02 -0700 (Sat, 04 Apr 2020)

Log 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:]):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (259540 => 259541)


--- trunk/Source/WebCore/ChangeLog	2020-04-05 00:03:45 UTC (rev 259540)
+++ trunk/Source/WebCore/ChangeLog	2020-04-05 00:42:02 UTC (rev 259541)
@@ -1,3 +1,24 @@
+2020-04-04  Wenson Hsieh  <[email protected]>
+
+        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.
+
+        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:]):
+
 2020-04-04  Doug Kelly  <[email protected]>
 
         Additional sanity checks in compareAnimationsByCompositeOrder()

Modified: trunk/Source/WebCore/platform/ios/WebItemProviderPasteboard.mm (259540 => 259541)


--- trunk/Source/WebCore/platform/ios/WebItemProviderPasteboard.mm	2020-04-05 00:03:45 UTC (rev 259540)
+++ trunk/Source/WebCore/platform/ios/WebItemProviderPasteboard.mm	2020-04-05 00:42:02 UTC (rev 259541)
@@ -857,6 +857,7 @@
 {
     ASSERT(lists.count);
     NSLog(@"%s - %@", __PRETTY_FUNCTION__, lists);
+    WTFReportBacktrace();
     _stagedRegistrationInfoLists = lists;
 }
 

Modified: trunk/Source/WebKit/ChangeLog (259540 => 259541)


--- trunk/Source/WebKit/ChangeLog	2020-04-05 00:03:45 UTC (rev 259540)
+++ trunk/Source/WebKit/ChangeLog	2020-04-05 00:42:02 UTC (rev 259541)
@@ -1,3 +1,18 @@
+2020-04-04  Wenson Hsieh  <[email protected]>
+
+        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.
+
+        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:]):
+
 2020-04-04  Chris Dumez  <[email protected]>
 
         [iOS] Simplify ProcessAssertion class in preparation for switch to RunningBoard

Modified: trunk/Source/WebKit/UIProcess/ios/DragDropInteractionState.mm (259540 => 259541)


--- trunk/Source/WebKit/UIProcess/ios/DragDropInteractionState.mm	2020-04-05 00:03:45 UTC (rev 259540)
+++ trunk/Source/WebKit/UIProcess/ios/DragDropInteractionState.mm	2020-04-05 00:42:02 UTC (rev 259541)
@@ -339,7 +339,6 @@
 
 void DragDropInteractionState::stageDragItem(const DragItem& item, UIImage *dragImage)
 {
-    NSLog(@"%s - source action := %02x", __PRETTY_FUNCTION__, item.sourceAction);
     static NSInteger currentDragSourceItemIdentifier = 0;
 
     m_adjustedPositionForDragEnd = item.eventPositionInContentCoordinates;
@@ -364,9 +363,6 @@
 
 void DragDropInteractionState::clearStagedDragSource(DidBecomeActive didBecomeActive)
 {
-    if (m_stagedDragSource)
-        NSLog(@"%s - source action := %02x", __PRETTY_FUNCTION__, m_stagedDragSource->action);
-
     if (didBecomeActive == DidBecomeActive::Yes)
         m_activeDragSources.append(stagedDragSource());
     m_stagedDragSource = WTF::nullopt;

Modified: trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm (259540 => 259541)


--- trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm	2020-04-05 00:03:45 UTC (rev 259540)
+++ trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm	2020-04-05 00:42:02 UTC (rev 259541)
@@ -7079,7 +7079,7 @@
     BlockPtr<void()> savedCompletionBlock = _dragDropInteractionState.takeDragStartCompletionBlock();
     ASSERT(savedCompletionBlock);
 
-    NSLog(@"Handling drag start request (started: %d, completion block: %p)", started, savedCompletionBlock.get());
+    RELEASE_LOG(DragAndDrop, "Handling drag start request (started: %d, completion block: %p)", started, savedCompletionBlock.get());
     if (savedCompletionBlock)
         savedCompletionBlock();
 

Modified: trunk/Tools/ChangeLog (259540 => 259541)


--- trunk/Tools/ChangeLog	2020-04-05 00:03:45 UTC (rev 259540)
+++ trunk/Tools/ChangeLog	2020-04-05 00:42:02 UTC (rev 259541)
@@ -1,3 +1,15 @@
+2020-04-04  Wenson Hsieh  <[email protected]>
+
+        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.
+
+        Remove all logging previously added to DragAndDropSimulator.
+
+        * TestWebKitAPI/ios/DragAndDropSimulatorIOS.mm:
+        (-[DragAndDropSimulator _webView:adjustedDataInteractionItemProvidersForItemProvider:representingObjects:additionalData:]):
+
 2020-04-04  Chris Dumez  <[email protected]>
 
         [iOS] Simplify ProcessAssertion class in preparation for switch to RunningBoard

Modified: trunk/Tools/TestWebKitAPI/ios/DragAndDropSimulatorIOS.mm (259540 => 259541)


--- trunk/Tools/TestWebKitAPI/ios/DragAndDropSimulatorIOS.mm	2020-04-05 00:03:45 UTC (rev 259540)
+++ trunk/Tools/TestWebKitAPI/ios/DragAndDropSimulatorIOS.mm	2020-04-05 00:42:02 UTC (rev 259541)
@@ -607,7 +607,6 @@
         NSMutableArray<NSItemProvider *> *itemProviders = [NSMutableArray array];
         NSArray *items = [[_webView dragInteractionDelegate] dragInteraction:[_webView dragInteraction] itemsForBeginningSession:_dragSession.get()];
         if (!items.count) {
-            NSLog(@"%s (found no drag items when beginning session)", __PRETTY_FUNCTION__);
             _phase = DragAndDropPhaseCancelled;
             _currentProgress = 1;
             _isDoneWithCurrentRun = true;
@@ -898,7 +897,6 @@
 
 - (NSArray *)_webView:(WKWebView *)webView adjustedDataInteractionItemProvidersForItemProvider:(NSItemProvider *)itemProvider representingObjects:(NSArray *)representingObjects additionalData:(NSDictionary *)additionalData
 {
-    NSLog(@"%s - self.convertItemProvidersBlock := %p; itemProvider.registeredTypeIdentifiers := %@", __PRETTY_FUNCTION__, self.convertItemProvidersBlock, itemProvider.registeredTypeIdentifiers);
     return self.convertItemProvidersBlock ? self.convertItemProvidersBlock(itemProvider, representingObjects, additionalData) : @[ itemProvider ];
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to