Changeset 228258 in webkit


Ignore:
Timestamp:
Feb 7, 2018 8:10:09 PM (6 years ago)
Author:
aestes@apple.com
Message:

ASSERTION FAILED: vm->currentThreadIsHoldingAPILock() seen with http/tests/paymentrequest/payment-request-show-method.https.html
https://bugs.webkit.org/show_bug.cgi?id=182591

Reviewed by Youenn Fablet.

Fixes assertion failures in http/tests/paymentrequest/payment-request-show-method.https.html.

DOMPromise::whenSettled() calls the JSC API without first aquiring the API lock, and
r228195 added a call to whenSettled() where the lock is not guaranteed to be already
acquired.

Fix this by creating a JSLockHolder in DOMPromise::whenSettled().

  • bindings/js/JSDOMPromise.cpp:

(WebCore::DOMPromise::whenSettled):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r228254 r228258  
     12018-02-07  Andy Estes  <aestes@apple.com>
     2
     3        ASSERTION FAILED: vm->currentThreadIsHoldingAPILock() seen with http/tests/paymentrequest/payment-request-show-method.https.html
     4        https://bugs.webkit.org/show_bug.cgi?id=182591
     5
     6        Reviewed by Youenn Fablet.
     7
     8        Fixes assertion failures in http/tests/paymentrequest/payment-request-show-method.https.html.
     9
     10        DOMPromise::whenSettled() calls the JSC API without first aquiring the API lock, and
     11        r228195 added a call to whenSettled() where the lock is not guaranteed to be already
     12        acquired.
     13
     14        Fix this by creating a JSLockHolder in DOMPromise::whenSettled().
     15
     16        * bindings/js/JSDOMPromise.cpp:
     17        (WebCore::DOMPromise::whenSettled):
     18
    1192018-02-07  Ryan Haddad  <ryanhaddad@apple.com>
    220
  • trunk/Source/WebCore/bindings/js/JSDOMPromise.cpp

    r228218 r228258  
    5656    auto& state = *globalObject()->globalExec();
    5757    auto& vm = state.vm();
     58    JSLockHolder lock(vm);
    5859    auto* handler = JSC::JSNativeStdFunction::create(vm, globalObject(), 1, String { }, [callback = WTFMove(callback)] (ExecState*) mutable {
    5960        callback();
Note: See TracChangeset for help on using the changeset viewer.