Title: [277477] trunk/Source/_javascript_Core
Revision
277477
Author
[email protected]
Date
2021-05-13 19:13:53 -0700 (Thu, 13 May 2021)

Log Message

[REGRESSION: r271876] Web Inspector: [Cocoa] Remote inspection crashes when using WEB_THREAD
https://bugs.webkit.org/show_bug.cgi?id=225794

Reviewed by Devin Rousso.

For WEB_THREAD, move `callback` in `dispatchAsyncOnTarget` to `block` scope to ensure it is available for the
lifetime of the block.

* inspector/remote/cocoa/RemoteConnectionToTargetCocoa.mm:
(Inspector::RemoteConnectionToTarget::dispatchAsyncOnTarget):

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (277476 => 277477)


--- trunk/Source/_javascript_Core/ChangeLog	2021-05-14 02:06:04 UTC (rev 277476)
+++ trunk/Source/_javascript_Core/ChangeLog	2021-05-14 02:13:53 UTC (rev 277477)
@@ -1,3 +1,16 @@
+2021-05-13  Patrick Angle  <[email protected]>
+
+        [REGRESSION: r271876] Web Inspector: [Cocoa] Remote inspection crashes when using WEB_THREAD
+        https://bugs.webkit.org/show_bug.cgi?id=225794
+
+        Reviewed by Devin Rousso.
+
+        For WEB_THREAD, move `callback` in `dispatchAsyncOnTarget` to `block` scope to ensure it is available for the
+        lifetime of the block.
+
+        * inspector/remote/cocoa/RemoteConnectionToTargetCocoa.mm:
+        (Inspector::RemoteConnectionToTarget::dispatchAsyncOnTarget):
+
 2021-05-13  Geoffrey Garen  <[email protected]>
 
         m_calleeSaveRegisters should not be a pointer to a pointer

Modified: trunk/Source/_javascript_Core/inspector/remote/cocoa/RemoteConnectionToTargetCocoa.mm (277476 => 277477)


--- trunk/Source/_javascript_Core/inspector/remote/cocoa/RemoteConnectionToTargetCocoa.mm	2021-05-14 02:06:04 UTC (rev 277476)
+++ trunk/Source/_javascript_Core/inspector/remote/cocoa/RemoteConnectionToTargetCocoa.mm	2021-05-14 02:13:53 UTC (rev 277477)
@@ -145,7 +145,10 @@
 
 #if USE(WEB_THREAD)
     if (WebCoreWebThreadIsEnabled && WebCoreWebThreadIsEnabled()) {
-        WebCoreWebThreadRun(^ { callback(); });
+        __block auto blockCallback(WTFMove(callback));
+        WebCoreWebThreadRun(^{
+            blockCallback();
+        });
         return;
     }
 #endif
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to