⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 277477 in webkit


Ignore:
Timestamp:
May 13, 2021, 7:13:53 PM (5 years ago)
Author:
Patrick Angle
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):

Location:
trunk/Source/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r277475 r277477  
     12021-05-13  Patrick Angle  <pangle@apple.com>
     2
     3        [REGRESSION: r271876] Web Inspector: [Cocoa] Remote inspection crashes when using WEB_THREAD
     4        https://bugs.webkit.org/show_bug.cgi?id=225794
     5
     6        Reviewed by Devin Rousso.
     7
     8        For WEB_THREAD, move `callback` in `dispatchAsyncOnTarget` to `block` scope to ensure it is available for the
     9        lifetime of the block.
     10
     11        * inspector/remote/cocoa/RemoteConnectionToTargetCocoa.mm:
     12        (Inspector::RemoteConnectionToTarget::dispatchAsyncOnTarget):
     13
    1142021-05-13  Geoffrey Garen  <ggaren@apple.com>
    215
  • trunk/Source/JavaScriptCore/inspector/remote/cocoa/RemoteConnectionToTargetCocoa.mm

    r274288 r277477  
    146146#if USE(WEB_THREAD)
    147147    if (WebCoreWebThreadIsEnabled && WebCoreWebThreadIsEnabled()) {
    148         WebCoreWebThreadRun(^ { callback(); });
     148        __block auto blockCallback(WTFMove(callback));
     149        WebCoreWebThreadRun(^{
     150            blockCallback();
     151        });
    149152        return;
    150153    }
Note: See TracChangeset for help on using the changeset viewer.