Title: [250785] trunk/Tools
Revision
250785
Author
[email protected]
Date
2019-10-07 13:31:01 -0700 (Mon, 07 Oct 2019)

Log Message

Crash in WebKitTestRunnerApp: invocation function for block in WTR::UIScriptControllerIOS::sendEventStream
https://bugs.webkit.org/show_bug.cgi?id=202646
<rdar://problem/54576522>

Patch by Antoine Quint <[email protected]> on 2019-10-07
Reviewed by Tim Horton.

* WebKitTestRunner/ios/UIScriptControllerIOS.mm:
(WTR::UIScriptControllerIOS::sendEventStream):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (250784 => 250785)


--- trunk/Tools/ChangeLog	2019-10-07 20:07:33 UTC (rev 250784)
+++ trunk/Tools/ChangeLog	2019-10-07 20:31:01 UTC (rev 250785)
@@ -1,3 +1,14 @@
+2019-10-07  Antoine Quint  <[email protected]>
+
+        Crash in WebKitTestRunnerApp: invocation function for block in WTR::UIScriptControllerIOS::sendEventStream
+        https://bugs.webkit.org/show_bug.cgi?id=202646
+        <rdar://problem/54576522>
+
+        Reviewed by Tim Horton.
+
+        * WebKitTestRunner/ios/UIScriptControllerIOS.mm:
+        (WTR::UIScriptControllerIOS::sendEventStream):
+
 2019-10-07  Jonathan Bedard  <[email protected]>
 
         results.webkit.org: Start reporting results

Modified: trunk/Tools/WebKitTestRunner/ios/UIScriptControllerIOS.mm (250784 => 250785)


--- trunk/Tools/WebKitTestRunner/ios/UIScriptControllerIOS.mm	2019-10-07 20:07:33 UTC (rev 250784)
+++ trunk/Tools/WebKitTestRunner/ios/UIScriptControllerIOS.mm	2019-10-07 20:31:01 UTC (rev 250785)
@@ -43,6 +43,7 @@
 #import <WebKit/WKWebViewPrivate.h>
 #import <WebKit/WebKit.h>
 #import <pal/spi/ios/GraphicsServicesSPI.h>
+#import <wtf/BlockPtr.h>
 #import <wtf/SoftLinking.h>
 #import <wtf/Vector.h>
 
@@ -425,12 +426,14 @@
         WTFLogAlways("JSON is not convertible to a dictionary");
         return;
     }
-    
-    [[HIDEventGenerator sharedHIDEventGenerator] sendEventStream:eventInfo completionBlock:^{
+
+    auto completion = makeBlockPtr([this, protectedThis = makeRefPtr(*this), callbackID] {
         if (!m_context)
             return;
         m_context->asyncTaskComplete(callbackID);
-    }];
+    });
+
+    [[HIDEventGenerator sharedHIDEventGenerator] sendEventStream:eventInfo completionBlock:completion.get()];
 }
 
 void UIScriptControllerIOS::dragFromPointToPoint(long startX, long startY, long endX, long endY, double durationSeconds, JSValueRef callback)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to