Changeset 286284 in webkit
- Timestamp:
- Nov 29, 2021 9:24:37 PM (8 months ago)
- Location:
- trunk
- Files:
-
- 1 added
- 61 edited
- 4 copied
-
LayoutTests/imported/w3c/ChangeLog (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/web-locks/acquire.tentative.https.any-expected.txt (modified) (2 diffs)
-
LayoutTests/imported/w3c/web-platform-tests/web-locks/acquire.tentative.https.any.serviceworker-expected.txt (modified) (2 diffs)
-
LayoutTests/imported/w3c/web-platform-tests/web-locks/acquire.tentative.https.any.worker-expected.txt (modified) (2 diffs)
-
LayoutTests/imported/w3c/web-platform-tests/web-locks/clientids.tentative.https-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/web-locks/frames.tentative.https-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/web-locks/held.tentative.https.any-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/web-locks/held.tentative.https.any.serviceworker-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/web-locks/held.tentative.https.any.worker-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/web-locks/idlharness.tentative.https.any-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/web-locks/idlharness.tentative.https.any.serviceworker-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/web-locks/idlharness.tentative.https.any.worker-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/web-locks/ifAvailable.tentative.https.any-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/web-locks/ifAvailable.tentative.https.any.serviceworker-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/web-locks/ifAvailable.tentative.https.any.worker-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/web-locks/lock-attributes.tentative.https.any-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/web-locks/lock-attributes.tentative.https.any.serviceworker-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/web-locks/lock-attributes.tentative.https.any.worker-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/web-locks/mode-exclusive.tentative.https.any-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/web-locks/mode-exclusive.tentative.https.any.serviceworker-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/web-locks/mode-exclusive.tentative.https.any.worker-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/web-locks/mode-mixed.tentative.https.any-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/web-locks/mode-mixed.tentative.https.any.serviceworker-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/web-locks/mode-mixed.tentative.https.any.worker-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/web-locks/mode-shared.tentative.https.any-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/web-locks/mode-shared.tentative.https.any.serviceworker-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/web-locks/mode-shared.tentative.https.any.worker-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/web-locks/opaque-origin.tentative.https-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/web-locks/query-empty.tentative.https.any-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/web-locks/query-empty.tentative.https.any.serviceworker-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/web-locks/query-empty.tentative.https.any.worker-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/web-locks/query-ordering.tentative.https-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/web-locks/query.tentative.https.any-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/web-locks/query.tentative.https.any.worker-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/web-locks/resource-names.tentative.https.any-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/web-locks/resource-names.tentative.https.any.serviceworker-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/web-locks/resource-names.tentative.https.any.worker-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/web-locks/signal.tentative.https.any-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/web-locks/signal.tentative.https.any.serviceworker-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/web-locks/signal.tentative.https.any.worker-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/web-locks/steal.tentative.https.any-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/web-locks/steal.tentative.https.any.serviceworker-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/web-locks/steal.tentative.https.any.worker-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/web-locks/workers.tentative.https-expected.txt (modified) (1 diff)
-
Source/WTF/ChangeLog (modified) (1 diff)
-
Source/WTF/wtf/Deque.h (modified) (2 diffs)
-
Source/WebCore/CMakeLists.txt (modified) (1 diff)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/DerivedSources-input.xcfilelist (modified) (1 diff)
-
Source/WebCore/DerivedSources-output.xcfilelist (modified) (1 diff)
-
Source/WebCore/DerivedSources.make (modified) (1 diff)
-
Source/WebCore/Modules/web-locks/WebLock.cpp (modified) (1 diff)
-
Source/WebCore/Modules/web-locks/WebLock.h (modified) (2 diffs)
-
Source/WebCore/Modules/web-locks/WebLockGrantedCallback.idl (modified) (1 diff)
-
Source/WebCore/Modules/web-locks/WebLockIdentifier.h (copied) (copied from trunk/Source/WebCore/Modules/web-locks/WebLockGrantedCallback.idl) (1 diff)
-
Source/WebCore/Modules/web-locks/WebLockManager.cpp (modified) (1 diff)
-
Source/WebCore/Modules/web-locks/WebLockManager.h (modified) (2 diffs)
-
Source/WebCore/Modules/web-locks/WebLockManager.idl (modified) (2 diffs)
-
Source/WebCore/Modules/web-locks/WebLockManagerSnapshot.h (copied) (copied from trunk/Source/WebCore/Modules/web-locks/WebLock.h) (1 diff)
-
Source/WebCore/Modules/web-locks/WebLockManagerSnapshot.idl (copied) (copied from trunk/Source/WebCore/Modules/web-locks/WebLockGrantedCallback.idl) (1 diff)
-
Source/WebCore/Modules/web-locks/WebLockRegistry.cpp (added)
-
Source/WebCore/Modules/web-locks/WebLockRegistry.h (copied) (copied from trunk/Source/WebCore/Modules/web-locks/WebLock.h) (1 diff)
-
Source/WebCore/Sources.txt (modified) (2 diffs)
-
Source/WebCore/WebCore.xcodeproj/project.pbxproj (modified) (6 diffs)
-
Source/WebCore/bindings/js/JSDOMConvertPromise.h (modified) (2 diffs)
-
Source/WebCore/page/NavigatorBase.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/imported/w3c/ChangeLog
r286259 r286284 1 2021-11-29 Chris Dumez <cdumez@apple.com> 2 3 Add initial implementation for the Web Lock API 4 https://bugs.webkit.org/show_bug.cgi?id=233289 5 6 Reviewed by Geoff Garen. 7 8 Rebaseline Web Locks WPT tests now that they are all passing. 9 10 * web-platform-tests/web-locks/acquire.tentative.https.any-expected.txt: 11 * web-platform-tests/web-locks/acquire.tentative.https.any.serviceworker-expected.txt: 12 * web-platform-tests/web-locks/acquire.tentative.https.any.worker-expected.txt: 13 * web-platform-tests/web-locks/clientids.tentative.https-expected.txt: 14 * web-platform-tests/web-locks/frames.tentative.https-expected.txt: 15 * web-platform-tests/web-locks/held.tentative.https.any-expected.txt: 16 * web-platform-tests/web-locks/held.tentative.https.any.serviceworker-expected.txt: 17 * web-platform-tests/web-locks/held.tentative.https.any.worker-expected.txt: 18 * web-platform-tests/web-locks/idlharness.tentative.https.any-expected.txt: 19 * web-platform-tests/web-locks/idlharness.tentative.https.any.serviceworker-expected.txt: 20 * web-platform-tests/web-locks/idlharness.tentative.https.any.worker-expected.txt: 21 * web-platform-tests/web-locks/ifAvailable.tentative.https.any-expected.txt: 22 * web-platform-tests/web-locks/ifAvailable.tentative.https.any.serviceworker-expected.txt: 23 * web-platform-tests/web-locks/ifAvailable.tentative.https.any.worker-expected.txt: 24 * web-platform-tests/web-locks/lock-attributes.tentative.https.any-expected.txt: 25 * web-platform-tests/web-locks/lock-attributes.tentative.https.any.serviceworker-expected.txt: 26 * web-platform-tests/web-locks/lock-attributes.tentative.https.any.worker-expected.txt: 27 * web-platform-tests/web-locks/mode-exclusive.tentative.https.any-expected.txt: 28 * web-platform-tests/web-locks/mode-exclusive.tentative.https.any.serviceworker-expected.txt: 29 * web-platform-tests/web-locks/mode-exclusive.tentative.https.any.worker-expected.txt: 30 * web-platform-tests/web-locks/mode-mixed.tentative.https.any-expected.txt: 31 * web-platform-tests/web-locks/mode-mixed.tentative.https.any.serviceworker-expected.txt: 32 * web-platform-tests/web-locks/mode-mixed.tentative.https.any.worker-expected.txt: 33 * web-platform-tests/web-locks/mode-shared.tentative.https.any-expected.txt: 34 * web-platform-tests/web-locks/mode-shared.tentative.https.any.serviceworker-expected.txt: 35 * web-platform-tests/web-locks/mode-shared.tentative.https.any.worker-expected.txt: 36 * web-platform-tests/web-locks/opaque-origin.tentative.https-expected.txt: 37 * web-platform-tests/web-locks/query-empty.tentative.https.any-expected.txt: 38 * web-platform-tests/web-locks/query-empty.tentative.https.any.serviceworker-expected.txt: 39 * web-platform-tests/web-locks/query-empty.tentative.https.any.worker-expected.txt: 40 * web-platform-tests/web-locks/query-ordering.tentative.https-expected.txt: 41 * web-platform-tests/web-locks/query.tentative.https.any-expected.txt: 42 * web-platform-tests/web-locks/query.tentative.https.any.worker-expected.txt: 43 * web-platform-tests/web-locks/resource-names.tentative.https.any-expected.txt: 44 * web-platform-tests/web-locks/resource-names.tentative.https.any.serviceworker-expected.txt: 45 * web-platform-tests/web-locks/resource-names.tentative.https.any.worker-expected.txt: 46 * web-platform-tests/web-locks/signal.tentative.https.any-expected.txt: 47 * web-platform-tests/web-locks/signal.tentative.https.any.serviceworker-expected.txt: 48 * web-platform-tests/web-locks/signal.tentative.https.any.worker-expected.txt: 49 * web-platform-tests/web-locks/steal.tentative.https.any-expected.txt: 50 * web-platform-tests/web-locks/steal.tentative.https.any.serviceworker-expected.txt: 51 * web-platform-tests/web-locks/steal.tentative.https.any.worker-expected.txt: 52 * web-platform-tests/web-locks/workers.tentative.https-expected.txt: 53 1 54 2021-11-29 Chris Fleizach <cfleizach@apple.com> 2 55 -
trunk/LayoutTests/imported/w3c/web-platform-tests/web-locks/acquire.tentative.https.any-expected.txt
r285012 r286284 1 1 2 2 PASS navigator.locks.request requires a name and a callback 3 FAIL mode must be "shared" or "exclusive" promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported."3 PASS mode must be "shared" or "exclusive" 4 4 PASS The 'steal' and 'ifAvailable' options are mutually exclusive 5 5 PASS The 'steal' option must be used with exclusive locks … … 7 7 PASS The 'signal' and 'ifAvailable' options are mutually exclusive 8 8 PASS callback must be a function 9 FAIL navigator.locks.request's returned promise resolves after lock is released promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 10 FAIL Returned Promise rejects if callback throws synchronously promise_rejects_exactly: result should reject function "function () { throw e }" threw object "NotSupportedError: The operation is not supported." but we expected it to throw object "[object Object]" 11 FAIL Returned Promise rejects if callback throws asynchronously promise_rejects_exactly: result should reject function "function () { throw e }" threw object "NotSupportedError: The operation is not supported." but we expected it to throw object "[object Object]" 9 PASS navigator.locks.request's returned promise resolves after lock is released 10 PASS Returned Promise rejects if callback throws synchronously 11 PASS Returned Promise rejects if callback throws asynchronously 12 12 -
trunk/LayoutTests/imported/w3c/web-platform-tests/web-locks/acquire.tentative.https.any.serviceworker-expected.txt
r285954 r286284 1 2 Harness Error (FAIL), message = Unhandled rejection: The operation is not supported.3 1 4 2 PASS navigator.locks.request requires a name and a callback 5 FAIL mode must be "shared" or "exclusive" promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported."3 PASS mode must be "shared" or "exclusive" 6 4 PASS The 'steal' and 'ifAvailable' options are mutually exclusive 7 5 PASS The 'steal' option must be used with exclusive locks … … 9 7 PASS The 'signal' and 'ifAvailable' options are mutually exclusive 10 8 PASS callback must be a function 11 FAIL navigator.locks.request's returned promise resolves after lock is released promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 12 FAIL Returned Promise rejects if callback throws synchronously promise_rejects_exactly: result should reject function "function () { throw e }" threw object "NotSupportedError: The operation is not supported." but we expected it to throw object "[object Object]" 13 FAIL Returned Promise rejects if callback throws asynchronously promise_rejects_exactly: result should reject function "function () { throw e }" threw object "NotSupportedError: The operation is not supported." but we expected it to throw object "[object Object]" 9 PASS navigator.locks.request's returned promise resolves after lock is released 10 PASS Returned Promise rejects if callback throws synchronously 11 PASS Returned Promise rejects if callback throws asynchronously 14 12 -
trunk/LayoutTests/imported/w3c/web-platform-tests/web-locks/acquire.tentative.https.any.worker-expected.txt
r285012 r286284 1 1 2 2 PASS navigator.locks.request requires a name and a callback 3 FAIL mode must be "shared" or "exclusive" promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported."3 PASS mode must be "shared" or "exclusive" 4 4 PASS The 'steal' and 'ifAvailable' options are mutually exclusive 5 5 PASS The 'steal' option must be used with exclusive locks … … 7 7 PASS The 'signal' and 'ifAvailable' options are mutually exclusive 8 8 PASS callback must be a function 9 FAIL navigator.locks.request's returned promise resolves after lock is released promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 10 FAIL Returned Promise rejects if callback throws synchronously promise_rejects_exactly: result should reject function "function () { throw e }" threw object "NotSupportedError: The operation is not supported." but we expected it to throw object "[object Object]" 11 FAIL Returned Promise rejects if callback throws asynchronously promise_rejects_exactly: result should reject function "function () { throw e }" threw object "NotSupportedError: The operation is not supported." but we expected it to throw object "[object Object]" 9 PASS navigator.locks.request's returned promise resolves after lock is released 10 PASS Returned Promise rejects if callback throws synchronously 11 PASS Returned Promise rejects if callback throws asynchronously 12 12 -
trunk/LayoutTests/imported/w3c/web-platform-tests/web-locks/clientids.tentative.https-expected.txt
r285954 r286284 1 1 2 2 3 FAIL Client IDs match between Locks API and Service Workers assert_equals: clientIds should match, but are different expected "15-85" but got "NotSupportedError: The operation is not supported." 3 PASS Client IDs match between Locks API and Service Workers 4 4 -
trunk/LayoutTests/imported/w3c/web-platform-tests/web-locks/frames.tentative.https-expected.txt
r285012 r286284 1 CONSOLE MESSAGE: Unhandled Promise Rejection: NotSupportedError: The operation is not supported.2 1 3 Harness Error (TIMEOUT), message = null 2 PASS Window and Frame - shared mode 3 PASS Window and Frame - exclusive mode 4 PASS Frame and Frame - exclusive mode 5 PASS Terminated Frame with held lock 6 PASS Navigated Frame with held lock 7 PASS Navigated Frame with pending request 8 PASS Removed Frame with pending request 9 PASS Removed Frame as lock is granted 4 10 5 TIMEOUT Window and Frame - shared mode Test timed out6 NOTRUN Window and Frame - exclusive mode7 NOTRUN Frame and Frame - exclusive mode8 NOTRUN Terminated Frame with held lock9 NOTRUN Navigated Frame with held lock10 NOTRUN Navigated Frame with pending request11 NOTRUN Removed Frame with pending request12 NOTRUN Removed Frame as lock is granted13 -
trunk/LayoutTests/imported/w3c/web-platform-tests/web-locks/held.tentative.https.any-expected.txt
r285012 r286284 1 CONSOLE MESSAGE: Unhandled Promise Rejection: NotSupportedError: The operation is not supported.1 CONSOLE MESSAGE: Unhandled Promise Rejection: Error: this uncaught rejection is expected 2 2 3 Harness Error (TIMEOUT), message = null 3 PASS callback's result is promisified if not async 4 PASS lock is held until callback's returned promise resolves 5 PASS lock is held until callback's returned promise rejects 6 PASS held lock prevents the same client from acquiring it 4 7 5 FAIL callback's result is promisified if not async promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported."6 TIMEOUT lock is held until callback's returned promise resolves Test timed out7 NOTRUN lock is held until callback's returned promise rejects8 NOTRUN held lock prevents the same client from acquiring it9 -
trunk/LayoutTests/imported/w3c/web-platform-tests/web-locks/held.tentative.https.any.serviceworker-expected.txt
r285954 r286284 1 1 2 Harness Error (TIMEOUT), message = null 2 PASS callback's result is promisified if not async 3 PASS lock is held until callback's returned promise resolves 4 PASS lock is held until callback's returned promise rejects 5 PASS held lock prevents the same client from acquiring it 3 6 4 FAIL callback's result is promisified if not async promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported."5 TIMEOUT lock is held until callback's returned promise resolves Test timed out6 NOTRUN lock is held until callback's returned promise rejects7 NOTRUN held lock prevents the same client from acquiring it8 -
trunk/LayoutTests/imported/w3c/web-platform-tests/web-locks/held.tentative.https.any.worker-expected.txt
r285012 r286284 1 1 2 Harness Error (TIMEOUT), message = null 2 PASS callback's result is promisified if not async 3 PASS lock is held until callback's returned promise resolves 4 PASS lock is held until callback's returned promise rejects 5 PASS held lock prevents the same client from acquiring it 3 6 4 FAIL callback's result is promisified if not async promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported."5 TIMEOUT lock is held until callback's returned promise resolves Test timed out6 NOTRUN lock is held until callback's returned promise rejects7 NOTRUN held lock prevents the same client from acquiring it8 -
trunk/LayoutTests/imported/w3c/web-platform-tests/web-locks/idlharness.tentative.https.any-expected.txt
r285012 r286284 40 40 PASS Lock interface: attribute name 41 41 PASS Lock interface: attribute mode 42 FAIL Lock must be primary interface of lock assert_equals: Unexpected exception when evaluating object expected null but got object "ReferenceError: Can't find variable: lock" 43 FAIL Stringification of lock assert_equals: Unexpected exception when evaluating object expected null but got object "ReferenceError: Can't find variable: lock" 44 FAIL Lock interface: lock must inherit property "name" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "ReferenceError: Can't find variable: lock" 45 FAIL Lock interface: lock must inherit property "mode" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "ReferenceError: Can't find variable: lock" 42 PASS Lock must be primary interface of lock 43 PASS Stringification of lock 44 PASS Lock interface: lock must inherit property "name" with the proper type 45 PASS Lock interface: lock must inherit property "mode" with the proper type 46 46 PASS Navigator interface: attribute locks 47 47 PASS Navigator interface: navigator must inherit property "locks" with the proper type -
trunk/LayoutTests/imported/w3c/web-platform-tests/web-locks/idlharness.tentative.https.any.serviceworker-expected.txt
r285954 r286284 40 40 PASS Lock interface: attribute name 41 41 PASS Lock interface: attribute mode 42 FAIL Lock must be primary interface of lock assert_equals: Unexpected exception when evaluating object expected null but got object "ReferenceError: Can't find variable: lock" 43 FAIL Stringification of lock assert_equals: Unexpected exception when evaluating object expected null but got object "ReferenceError: Can't find variable: lock" 44 FAIL Lock interface: lock must inherit property "name" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "ReferenceError: Can't find variable: lock" 45 FAIL Lock interface: lock must inherit property "mode" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "ReferenceError: Can't find variable: lock" 42 PASS Lock must be primary interface of lock 43 PASS Stringification of lock 44 PASS Lock interface: lock must inherit property "name" with the proper type 45 PASS Lock interface: lock must inherit property "mode" with the proper type 46 46 PASS WorkerNavigator interface: attribute locks 47 47 PASS WorkerNavigator interface: navigator must inherit property "locks" with the proper type -
trunk/LayoutTests/imported/w3c/web-platform-tests/web-locks/idlharness.tentative.https.any.worker-expected.txt
r285012 r286284 40 40 PASS Lock interface: attribute name 41 41 PASS Lock interface: attribute mode 42 FAIL Lock must be primary interface of lock assert_equals: Unexpected exception when evaluating object expected null but got object "ReferenceError: Can't find variable: lock" 43 FAIL Stringification of lock assert_equals: Unexpected exception when evaluating object expected null but got object "ReferenceError: Can't find variable: lock" 44 FAIL Lock interface: lock must inherit property "name" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "ReferenceError: Can't find variable: lock" 45 FAIL Lock interface: lock must inherit property "mode" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "ReferenceError: Can't find variable: lock" 42 PASS Lock must be primary interface of lock 43 PASS Stringification of lock 44 PASS Lock interface: lock must inherit property "name" with the proper type 45 PASS Lock interface: lock must inherit property "mode" with the proper type 46 46 PASS WorkerNavigator interface: attribute locks 47 47 PASS WorkerNavigator interface: navigator must inherit property "locks" with the proper type -
trunk/LayoutTests/imported/w3c/web-platform-tests/web-locks/ifAvailable.tentative.https.any-expected.txt
r285012 r286284 1 1 2 FAIL Lock request with ifAvailable - lock available promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 3 FAIL Lock request with ifAvailable - lock not available promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 4 FAIL Lock request with ifAvailable - lock not available, callback throws promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 5 FAIL Lock request with ifAvailable - unrelated lock held promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 6 FAIL Shared lock request with ifAvailable - shared lock held promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 7 FAIL Exclusive lock request with ifAvailable - shared lock held promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 8 FAIL Shared lock request with ifAvailable - exclusive lock held promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 9 FAIL Returned Promise rejects if callback throws synchronously promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 10 FAIL Returned Promise rejects if async callback yields rejected promise promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 11 FAIL Locks are available once previous release is processed promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 2 PASS Lock request with ifAvailable - lock available 3 PASS Lock request with ifAvailable - lock not available 4 PASS Lock request with ifAvailable - lock not available, callback throws 5 PASS Lock request with ifAvailable - unrelated lock held 6 PASS Shared lock request with ifAvailable - shared lock held 7 PASS Exclusive lock request with ifAvailable - shared lock held 8 PASS Shared lock request with ifAvailable - exclusive lock held 9 PASS Returned Promise rejects if callback throws synchronously 10 PASS Returned Promise rejects if async callback yields rejected promise 11 PASS Locks are available once previous release is processed 12 12 -
trunk/LayoutTests/imported/w3c/web-platform-tests/web-locks/ifAvailable.tentative.https.any.serviceworker-expected.txt
r285954 r286284 1 1 2 FAIL Lock request with ifAvailable - lock available promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 3 FAIL Lock request with ifAvailable - lock not available promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 4 FAIL Lock request with ifAvailable - lock not available, callback throws promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 5 FAIL Lock request with ifAvailable - unrelated lock held promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 6 FAIL Shared lock request with ifAvailable - shared lock held promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 7 FAIL Exclusive lock request with ifAvailable - shared lock held promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 8 FAIL Shared lock request with ifAvailable - exclusive lock held promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 9 FAIL Returned Promise rejects if callback throws synchronously promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 10 FAIL Returned Promise rejects if async callback yields rejected promise promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 11 FAIL Locks are available once previous release is processed promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 2 PASS Lock request with ifAvailable - lock available 3 PASS Lock request with ifAvailable - lock not available 4 PASS Lock request with ifAvailable - lock not available, callback throws 5 PASS Lock request with ifAvailable - unrelated lock held 6 PASS Shared lock request with ifAvailable - shared lock held 7 PASS Exclusive lock request with ifAvailable - shared lock held 8 PASS Shared lock request with ifAvailable - exclusive lock held 9 PASS Returned Promise rejects if callback throws synchronously 10 PASS Returned Promise rejects if async callback yields rejected promise 11 PASS Locks are available once previous release is processed 12 12 -
trunk/LayoutTests/imported/w3c/web-platform-tests/web-locks/ifAvailable.tentative.https.any.worker-expected.txt
r285012 r286284 1 1 2 FAIL Lock request with ifAvailable - lock available promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 3 FAIL Lock request with ifAvailable - lock not available promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 4 FAIL Lock request with ifAvailable - lock not available, callback throws promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 5 FAIL Lock request with ifAvailable - unrelated lock held promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 6 FAIL Shared lock request with ifAvailable - shared lock held promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 7 FAIL Exclusive lock request with ifAvailable - shared lock held promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 8 FAIL Shared lock request with ifAvailable - exclusive lock held promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 9 FAIL Returned Promise rejects if callback throws synchronously promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 10 FAIL Returned Promise rejects if async callback yields rejected promise promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 11 FAIL Locks are available once previous release is processed promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 2 PASS Lock request with ifAvailable - lock available 3 PASS Lock request with ifAvailable - lock not available 4 PASS Lock request with ifAvailable - lock not available, callback throws 5 PASS Lock request with ifAvailable - unrelated lock held 6 PASS Shared lock request with ifAvailable - shared lock held 7 PASS Exclusive lock request with ifAvailable - shared lock held 8 PASS Shared lock request with ifAvailable - exclusive lock held 9 PASS Returned Promise rejects if callback throws synchronously 10 PASS Returned Promise rejects if async callback yields rejected promise 11 PASS Locks are available once previous release is processed 12 12 -
trunk/LayoutTests/imported/w3c/web-platform-tests/web-locks/lock-attributes.tentative.https.any-expected.txt
r285012 r286284 1 1 2 FAIL Lock attributes reflect requested properties (exclusive) promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 3 FAIL Lock attributes reflect requested properties (shared) promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 2 PASS Lock attributes reflect requested properties (exclusive) 3 PASS Lock attributes reflect requested properties (shared) 4 4 -
trunk/LayoutTests/imported/w3c/web-platform-tests/web-locks/lock-attributes.tentative.https.any.serviceworker-expected.txt
r285954 r286284 1 1 2 FAIL Lock attributes reflect requested properties (exclusive) promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 3 FAIL Lock attributes reflect requested properties (shared) promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 2 PASS Lock attributes reflect requested properties (exclusive) 3 PASS Lock attributes reflect requested properties (shared) 4 4 -
trunk/LayoutTests/imported/w3c/web-platform-tests/web-locks/lock-attributes.tentative.https.any.worker-expected.txt
r285012 r286284 1 1 2 FAIL Lock attributes reflect requested properties (exclusive) promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 3 FAIL Lock attributes reflect requested properties (shared) promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 2 PASS Lock attributes reflect requested properties (exclusive) 3 PASS Lock attributes reflect requested properties (shared) 4 4 -
trunk/LayoutTests/imported/w3c/web-platform-tests/web-locks/mode-exclusive.tentative.https.any-expected.txt
r285012 r286284 1 1 2 FAIL Lock requests are granted in order promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 3 FAIL Requests for distinct resources can be granted promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 2 PASS Lock requests are granted in order 3 PASS Requests for distinct resources can be granted 4 4 -
trunk/LayoutTests/imported/w3c/web-platform-tests/web-locks/mode-exclusive.tentative.https.any.serviceworker-expected.txt
r285954 r286284 1 1 2 FAIL Lock requests are granted in order promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 3 FAIL Requests for distinct resources can be granted promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 2 PASS Lock requests are granted in order 3 PASS Requests for distinct resources can be granted 4 4 -
trunk/LayoutTests/imported/w3c/web-platform-tests/web-locks/mode-exclusive.tentative.https.any.worker-expected.txt
r285012 r286284 1 1 2 FAIL Lock requests are granted in order promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 3 FAIL Requests for distinct resources can be granted promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 2 PASS Lock requests are granted in order 3 PASS Requests for distinct resources can be granted 4 4 -
trunk/LayoutTests/imported/w3c/web-platform-tests/web-locks/mode-mixed.tentative.https.any-expected.txt
r285012 r286284 1 1 2 FAIL Lock requests are granted in order promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 3 FAIL Releasing exclusive lock grants multiple shared locks promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 4 FAIL An exclusive lock between shared locks promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 2 PASS Lock requests are granted in order 3 PASS Releasing exclusive lock grants multiple shared locks 4 PASS An exclusive lock between shared locks 5 5 -
trunk/LayoutTests/imported/w3c/web-platform-tests/web-locks/mode-mixed.tentative.https.any.serviceworker-expected.txt
r285954 r286284 1 1 2 Harness Error (FAIL), message = Unhandled rejection: The operation is not supported. 2 PASS Lock requests are granted in order 3 PASS Releasing exclusive lock grants multiple shared locks 4 PASS An exclusive lock between shared locks 3 5 4 FAIL Lock requests are granted in order promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported."5 FAIL Releasing exclusive lock grants multiple shared locks promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported."6 FAIL An exclusive lock between shared locks promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported."7 -
trunk/LayoutTests/imported/w3c/web-platform-tests/web-locks/mode-mixed.tentative.https.any.worker-expected.txt
r285012 r286284 1 1 2 FAIL Lock requests are granted in order promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 3 FAIL Releasing exclusive lock grants multiple shared locks promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 4 FAIL An exclusive lock between shared locks promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 2 PASS Lock requests are granted in order 3 PASS Releasing exclusive lock grants multiple shared locks 4 PASS An exclusive lock between shared locks 5 5 -
trunk/LayoutTests/imported/w3c/web-platform-tests/web-locks/mode-shared.tentative.https.any-expected.txt
r285012 r286284 1 1 2 FAIL Lock requests are granted in order promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 3 FAIL Shared locks are not exclusive promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 2 PASS Lock requests are granted in order 3 PASS Shared locks are not exclusive 4 4 -
trunk/LayoutTests/imported/w3c/web-platform-tests/web-locks/mode-shared.tentative.https.any.serviceworker-expected.txt
r285954 r286284 1 1 2 FAIL Lock requests are granted in order promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 3 FAIL Shared locks are not exclusive promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 2 PASS Lock requests are granted in order 3 PASS Shared locks are not exclusive 4 4 -
trunk/LayoutTests/imported/w3c/web-platform-tests/web-locks/mode-shared.tentative.https.any.worker-expected.txt
r285012 r286284 1 1 2 FAIL Lock requests are granted in order promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 3 FAIL Shared locks are not exclusive promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 2 PASS Lock requests are granted in order 3 PASS Shared locks are not exclusive 4 4 -
trunk/LayoutTests/imported/w3c/web-platform-tests/web-locks/opaque-origin.tentative.https-expected.txt
r285012 r286284 1 1 2 FAIL navigator.locks.request() in non-sandboxed iframe should not throw assert_equals: navigator.locks.request() should not throw expected "no exception" but got "NotSupportedError" 3 FAIL navigator.locks.request() in sandboxed iframe should throw SecurityError assert_equals: Exception should be SecurityError expected "SecurityError" but got "NotSupportedError" 4 FAIL navigator.locks.query() in non-sandboxed iframe should not throw assert_equals: navigator.locks.request() should not throw expected "no exception" but got "NotSupportedError" 5 FAIL navigator.locks.query() in sandboxed iframe should throw SecurityError assert_equals: Exception should be SecurityError expected "SecurityError" but got "NotSupportedError" 2 PASS navigator.locks.request() in non-sandboxed iframe should not throw 3 PASS navigator.locks.request() in sandboxed iframe should throw SecurityError 4 PASS navigator.locks.query() in non-sandboxed iframe should not throw 5 PASS navigator.locks.query() in sandboxed iframe should throw SecurityError 6 6 -
trunk/LayoutTests/imported/w3c/web-platform-tests/web-locks/query-empty.tentative.https.any-expected.txt
r285012 r286284 1 1 2 FAIL query() returns dictionary with empty arrays when no locks are held promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 2 PASS query() returns dictionary with empty arrays when no locks are held 3 3 -
trunk/LayoutTests/imported/w3c/web-platform-tests/web-locks/query-empty.tentative.https.any.serviceworker-expected.txt
r285954 r286284 1 1 2 FAIL query() returns dictionary with empty arrays when no locks are held promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 2 PASS query() returns dictionary with empty arrays when no locks are held 3 3 -
trunk/LayoutTests/imported/w3c/web-platform-tests/web-locks/query-empty.tentative.https.any.worker-expected.txt
r285012 r286284 1 1 2 FAIL query() returns dictionary with empty arrays when no locks are held promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 2 PASS query() returns dictionary with empty arrays when no locks are held 3 3 -
trunk/LayoutTests/imported/w3c/web-platform-tests/web-locks/query-ordering.tentative.https-expected.txt
r285012 r286284 1 CONSOLE MESSAGE: Unhandled Promise Rejection: NotSupportedError: The operation is not supported.2 1 3 Harness Error (TIMEOUT), message = null 2 PASS Requests appear in state in order made. 4 3 5 TIMEOUT Requests appear in state in order made. Test timed out6 -
trunk/LayoutTests/imported/w3c/web-platform-tests/web-locks/query.tentative.https.any-expected.txt
r285012 r286284 1 1 2 Harness Error (TIMEOUT), message = null 2 PASS query() returns dictionaries with expected properties 3 PASS query() reports individual held locks 4 PASS query() reports multiple held locks 5 PASS query() reports pending and held locks 6 PASS query() reports held shared locks with appropriate count 7 PASS query() reports pending shared locks with appropriate count 8 PASS query() reports the same clientId for held locks from the same context 9 PASS query() reports different ids for held locks from different contexts 10 PASS query() can observe a deadlock 3 11 4 FAIL query() returns dictionaries with expected properties promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported."5 FAIL query() reports individual held locks promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported."6 FAIL query() reports multiple held locks promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported."7 FAIL query() reports pending and held locks promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported."8 FAIL query() reports held shared locks with appropriate count promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported."9 FAIL query() reports pending shared locks with appropriate count promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported."10 FAIL query() reports the same clientId for held locks from the same context promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported."11 TIMEOUT query() reports different ids for held locks from different contexts Test timed out12 NOTRUN query() can observe a deadlock13 -
trunk/LayoutTests/imported/w3c/web-platform-tests/web-locks/query.tentative.https.any.worker-expected.txt
r285012 r286284 1 1 2 FAIL query() returns dictionaries with expected properties promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 3 FAIL query() reports individual held locks promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 4 FAIL query() reports multiple held locks promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 5 FAIL query() reports pending and held locks promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 6 FAIL query() reports held shared locks with appropriate count promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 7 FAIL query() reports pending shared locks with appropriate count promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 8 FAIL query() reports the same clientId for held locks from the same context promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 2 PASS query() returns dictionaries with expected properties 3 PASS query() reports individual held locks 4 PASS query() reports multiple held locks 5 PASS query() reports pending and held locks 6 PASS query() reports held shared locks with appropriate count 7 PASS query() reports pending shared locks with appropriate count 8 PASS query() reports the same clientId for held locks from the same context 9 9 FAIL query() reports different ids for held locks from different contexts promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: Worker" 10 10 FAIL query() can observe a deadlock promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: Worker" -
trunk/LayoutTests/imported/w3c/web-platform-tests/web-locks/resource-names.tentative.https.any-expected.txt
r285012 r286284 1 1 2 FAIL DOMString: promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 3 FAIL DOMString: 0x61 0x62 0x63 0x0 0x64 0x65 0x66 promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 4 FAIL DOMString: 0xD800 promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 5 FAIL DOMString: 0xDC00 promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 6 FAIL DOMString: 0xDC00 0xD800 promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 7 FAIL DOMString: 0xFFFF promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 8 FAIL Resource names that are not valid UTF-16 are not mangled promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 9 FAIL Names cannot start with "-" promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported."2 PASS DOMString: 3 PASS DOMString: 0x61 0x62 0x63 0x0 0x64 0x65 0x66 4 PASS DOMString: 0xD800 5 PASS DOMString: 0xDC00 6 PASS DOMString: 0xDC00 0xD800 7 PASS DOMString: 0xFFFF 8 PASS Resource names that are not valid UTF-16 are not mangled 9 PASS Names cannot start with "-" 10 10 -
trunk/LayoutTests/imported/w3c/web-platform-tests/web-locks/resource-names.tentative.https.any.serviceworker-expected.txt
r285954 r286284 1 1 2 FAIL DOMString: promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 3 FAIL DOMString: 0x61 0x62 0x63 0x0 0x64 0x65 0x66 promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 4 FAIL DOMString: 0xD800 promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 5 FAIL DOMString: 0xDC00 promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 6 FAIL DOMString: 0xDC00 0xD800 promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 7 FAIL DOMString: 0xFFFF promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 8 FAIL Resource names that are not valid UTF-16 are not mangled promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 9 FAIL Names cannot start with "-" promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported."2 PASS DOMString: 3 PASS DOMString: 0x61 0x62 0x63 0x0 0x64 0x65 0x66 4 PASS DOMString: 0xD800 5 PASS DOMString: 0xDC00 6 PASS DOMString: 0xDC00 0xD800 7 PASS DOMString: 0xFFFF 8 PASS Resource names that are not valid UTF-16 are not mangled 9 PASS Names cannot start with "-" 10 10 -
trunk/LayoutTests/imported/w3c/web-platform-tests/web-locks/resource-names.tentative.https.any.worker-expected.txt
r285012 r286284 1 1 2 FAIL DOMString: promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 3 FAIL DOMString: 0x61 0x62 0x63 0x0 0x64 0x65 0x66 promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 4 FAIL DOMString: 0xD800 promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 5 FAIL DOMString: 0xDC00 promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 6 FAIL DOMString: 0xDC00 0xD800 promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 7 FAIL DOMString: 0xFFFF promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 8 FAIL Resource names that are not valid UTF-16 are not mangled promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 9 FAIL Names cannot start with "-" promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported."2 PASS DOMString: 3 PASS DOMString: 0x61 0x62 0x63 0x0 0x64 0x65 0x66 4 PASS DOMString: 0xD800 5 PASS DOMString: 0xDC00 6 PASS DOMString: 0xDC00 0xD800 7 PASS DOMString: 0xFFFF 8 PASS Resource names that are not valid UTF-16 are not mangled 9 PASS Names cannot start with "-" 10 10 -
trunk/LayoutTests/imported/w3c/web-platform-tests/web-locks/signal.tentative.https.any-expected.txt
r285012 r286284 1 CONSOLE MESSAGE: Unhandled Promise Rejection: NotSupportedError: The operation is not supported.2 CONSOLE MESSAGE: Unhandled Promise Rejection: NotSupportedError: The operation is not supported.3 CONSOLE MESSAGE: Unhandled Promise Rejection: NotSupportedError: The operation is not supported.4 CONSOLE MESSAGE: Unhandled Promise Rejection: NotSupportedError: The operation is not supported.5 CONSOLE MESSAGE: Unhandled Promise Rejection: NotSupportedError: The operation is not supported.6 7 Harness Error (FAIL), message = Unhandled rejection: The operation is not supported.8 1 9 2 PASS The signal option must be an AbortSignal 10 FAIL Passing an already aborted signal aborts promise_rejects_dom: Request should reject with AbortError function "function () { throw e }" threw object "NotSupportedError: The operation is not supported." that is not a DOMException AbortError: property "code" is equal to 9, expected 20 11 FAIL An aborted request results in AbortError promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 12 FAIL Abort after a timeout promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 13 FAIL Signal that is not aborted promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 14 FAIL Synchronously signaled abort promise_rejects_dom: Request should abort function "function () { throw e }" threw object "NotSupportedError: The operation is not supported." that is not a DOMException AbortError: property "code" is equal to 9, expected 20 15 TIMEOUT Abort signaled after lock granted Test timed out 16 NOTRUNAbort signaled after lock released17 NOTRUNAbort should process the next pending lock request3 PASS Passing an already aborted signal aborts 4 PASS An aborted request results in AbortError 5 PASS Abort after a timeout 6 PASS Signal that is not aborted 7 PASS Synchronously signaled abort 8 PASS Abort signaled after lock granted 9 PASS Abort signaled after lock released 10 PASS Abort should process the next pending lock request 18 11 -
trunk/LayoutTests/imported/w3c/web-platform-tests/web-locks/signal.tentative.https.any.serviceworker-expected.txt
r285954 r286284 1 2 Harness Error (TIMEOUT), message = null3 1 4 2 PASS The signal option must be an AbortSignal 5 FAIL Passing an already aborted signal aborts promise_rejects_dom: Request should reject with AbortError function "function () { throw e }" threw object "NotSupportedError: The operation is not supported." that is not a DOMException AbortError: property "code" is equal to 9, expected 20 6 FAIL An aborted request results in AbortError promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 7 FAIL Abort after a timeout promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 8 FAIL Signal that is not aborted promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 9 FAIL Synchronously signaled abort promise_rejects_dom: Request should abort function "function () { throw e }" threw object "NotSupportedError: The operation is not supported." that is not a DOMException AbortError: property "code" is equal to 9, expected 20 10 TIMEOUT Abort signaled after lock granted Test timed out 11 NOTRUNAbort signaled after lock released12 NOTRUNAbort should process the next pending lock request3 PASS Passing an already aborted signal aborts 4 PASS An aborted request results in AbortError 5 PASS Abort after a timeout 6 PASS Signal that is not aborted 7 PASS Synchronously signaled abort 8 PASS Abort signaled after lock granted 9 PASS Abort signaled after lock released 10 PASS Abort should process the next pending lock request 13 11 -
trunk/LayoutTests/imported/w3c/web-platform-tests/web-locks/signal.tentative.https.any.worker-expected.txt
r285012 r286284 1 2 Harness Error (TIMEOUT), message = null3 1 4 2 PASS The signal option must be an AbortSignal 5 FAIL Passing an already aborted signal aborts promise_rejects_dom: Request should reject with AbortError function "function () { throw e }" threw object "NotSupportedError: The operation is not supported." that is not a DOMException AbortError: property "code" is equal to 9, expected 20 6 FAIL An aborted request results in AbortError promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 7 FAIL Abort after a timeout promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 8 FAIL Signal that is not aborted promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 9 FAIL Synchronously signaled abort promise_rejects_dom: Request should abort function "function () { throw e }" threw object "NotSupportedError: The operation is not supported." that is not a DOMException AbortError: property "code" is equal to 9, expected 20 10 TIMEOUT Abort signaled after lock granted Test timed out 11 NOTRUNAbort signaled after lock released12 NOTRUNAbort should process the next pending lock request3 PASS Passing an already aborted signal aborts 4 PASS An aborted request results in AbortError 5 PASS Abort after a timeout 6 PASS Signal that is not aborted 7 PASS Synchronously signaled abort 8 PASS Abort signaled after lock granted 9 PASS Abort signaled after lock released 10 PASS Abort should process the next pending lock request 13 11 -
trunk/LayoutTests/imported/w3c/web-platform-tests/web-locks/steal.tentative.https.any-expected.txt
r285012 r286284 1 1 2 FAIL Lock available promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 3 FAIL Lock not available promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 4 FAIL Broken lock's release promise rejects promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 5 FAIL Requested lock's release promise is deferred promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 6 FAIL Last caller wins promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 2 PASS Lock available 3 PASS Lock not available 4 PASS Broken lock's release promise rejects 5 PASS Requested lock's release promise is deferred 6 PASS Last caller wins 7 7 -
trunk/LayoutTests/imported/w3c/web-platform-tests/web-locks/steal.tentative.https.any.serviceworker-expected.txt
r285954 r286284 1 1 2 Harness Error (FAIL), message = Unhandled rejection: The operation is not supported. 2 PASS Lock available 3 PASS Lock not available 4 PASS Broken lock's release promise rejects 5 PASS Requested lock's release promise is deferred 6 PASS Last caller wins 3 7 4 FAIL Lock available promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported."5 FAIL Lock not available promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported."6 FAIL Broken lock's release promise rejects promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported."7 FAIL Requested lock's release promise is deferred promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported."8 FAIL Last caller wins promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported."9 -
trunk/LayoutTests/imported/w3c/web-platform-tests/web-locks/steal.tentative.https.any.worker-expected.txt
r285012 r286284 1 1 2 FAIL Lock available promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 3 FAIL Lock not available promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 4 FAIL Broken lock's release promise rejects promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 5 FAIL Requested lock's release promise is deferred promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 6 FAIL Last caller wins promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported." 2 PASS Lock available 3 PASS Lock not available 4 PASS Broken lock's release promise rejects 5 PASS Requested lock's release promise is deferred 6 PASS Last caller wins 7 7 -
trunk/LayoutTests/imported/w3c/web-platform-tests/web-locks/workers.tentative.https-expected.txt
r285012 r286284 1 1 2 Harness Error (TIMEOUT), message = null 2 PASS Window and Worker - shared mode 3 PASS Window and Worker - exclusive mode 4 PASS Worker and Worker - exclusive mode 5 PASS Terminated Worker - exclusive mode 3 6 4 TIMEOUT Window and Worker - shared mode Test timed out5 NOTRUN Window and Worker - exclusive mode6 NOTRUN Worker and Worker - exclusive mode7 NOTRUN Terminated Worker - exclusive mode8 -
trunk/Source/WTF/ChangeLog
r286272 r286284 1 2021-11-29 Chris Dumez <cdumez@apple.com> 2 3 Add initial implementation for the Web Lock API 4 https://bugs.webkit.org/show_bug.cgi?id=233289 5 6 Reviewed by Geoff Garen. 7 8 Update Deque::removeAllMatching() to return the number of items removed, similarly 9 to the corresponding API on Vector. 10 11 * wtf/Deque.h: 12 (WTF::inlineCapacity>::removeAllMatching): 13 1 14 2021-11-29 David Kilzer <ddkilzer@apple.com> 2 15 -
trunk/Source/WTF/wtf/Deque.h
r281270 r286284 95 95 void remove(const_iterator&); 96 96 97 template<typename Func> voidremoveAllMatching(const Func&);97 template<typename Func> size_t removeAllMatching(const Func&); 98 98 99 99 // This is a priority enqueue. The callback is given a value, and if it returns true, then this … … 562 562 template<typename T, size_t inlineCapacity> 563 563 template<typename Func> 564 inline voidDeque<T, inlineCapacity>::removeAllMatching(const Func& func)565 { 566 size_t count= size();567 while (count--) {568 Tvalue = takeFirst();564 inline size_t Deque<T, inlineCapacity>::removeAllMatching(const Func& func) 565 { 566 auto oldSize = size(); 567 for (size_t i = 0; i < oldSize; ++i) { 568 auto value = takeFirst(); 569 569 if (!func(value)) 570 570 append(WTFMove(value)); 571 571 } 572 return size() - oldSize; 572 573 } 573 574 -
trunk/Source/WebCore/CMakeLists.txt
r286161 r286284 561 561 Modules/web-locks/WebLockGrantedCallback.idl 562 562 Modules/web-locks/WebLockManager.idl 563 Modules/web-locks/WebLockManagerSnapshot.idl 563 564 Modules/web-locks/WebLockMode.idl 564 565 -
trunk/Source/WebCore/ChangeLog
r286282 r286284 1 2021-11-29 Chris Dumez <cdumez@apple.com> 2 3 Add initial implementation for the Web Lock API 4 https://bugs.webkit.org/show_bug.cgi?id=233289 5 6 Reviewed by Geoff Garen. 7 8 Add initial implementation for the Web Lock API as per: 9 - https://wicg.github.io/web-locks/#lockmanager 10 11 The implementation is complete and passes all the WPT tests. However, 12 to reduce the patch size, the current implementation only works within 13 a single WebProcess. In a follow-up, I'll update the implementation so 14 that the registry lives in the UIProcess and the WebProcess just does 15 IPC. 16 17 No new tests, rebaselined existing tests. 18 19 * CMakeLists.txt: 20 * DerivedSources-input.xcfilelist: 21 * DerivedSources-output.xcfilelist: 22 * DerivedSources.make: 23 * Modules/web-locks/WebLock.cpp: 24 (WebCore::WebLock::create): 25 (WebCore::WebLock::WebLock): 26 * Modules/web-locks/WebLock.h: 27 (WebCore::WebLock::identifier const): 28 * Modules/web-locks/WebLockGrantedCallback.idl: 29 * Modules/web-locks/WebLockIdentifier.h: Copied from Source/WebCore/Modules/web-locks/WebLockGrantedCallback.idl. 30 * Modules/web-locks/WebLockManager.cpp: 31 (WebCore::clientOriginFromContext): 32 (WebCore::WebLockManager::LockRequest::isValid const): 33 (WebCore::WebLockManager::create): 34 (WebCore::WebLockManager::WebLockManager): 35 (WebCore::WebLockManager::request): 36 (WebCore::WebLockManager::didCompleteLockRequest): 37 (WebCore::WebLockManager::requestLockOnMainThread): 38 (WebCore::WebLockManager::releaseLockOnMainThread): 39 (WebCore::WebLockManager::abortLockRequestOnMainThread): 40 (WebCore::WebLockManager::queryOnMainThread): 41 (WebCore::WebLockManager::query): 42 (WebCore::WebLockManager::signalToAbortTheRequest): 43 (WebCore::WebLockManager::settleReleasePromise): 44 (WebCore::WebLockManager::stop): 45 (WebCore::WebLockManager::virtualHasPendingActivity const): 46 (WebCore::WebLockManager::activeDOMObjectName const): 47 * Modules/web-locks/WebLockManager.h: 48 * Modules/web-locks/WebLockManager.idl: 49 * Modules/web-locks/WebLockManagerSnapshot.h: Copied from Source/WebCore/Modules/web-locks/WebLock.h. 50 (WebCore::WebLockManagerSnapshot::Info::isolatedCopy const): 51 (WebCore::WebLockManagerSnapshot::isolatedCopy const): 52 * Modules/web-locks/WebLockManagerSnapshot.idl: Copied from Source/WebCore/Modules/web-locks/WebLockGrantedCallback.idl. 53 * Modules/web-locks/WebLockRegistry.cpp: Added. 54 (WebCore::WebLockRegistry::registryForOrigin): 55 (WebCore::WebLockRegistry::WebLockRegistry): 56 (WebCore::WebLockRegistry::~WebLockRegistry): 57 (WebCore::WebLockRegistry::requestLock): 58 (WebCore::WebLockRegistry::releaseLock): 59 (WebCore::WebLockRegistry::abortLockRequest): 60 (WebCore::WebLockRegistry::isGrantable const): 61 (WebCore::WebLockRegistry::processLockRequestQueue): 62 (WebCore::WebLockRegistry::snapshot): 63 (WebCore::WebLockRegistry::clientIsGoingAway): 64 * Modules/web-locks/WebLockRegistry.h: Copied from Source/WebCore/Modules/web-locks/WebLock.h. 65 * Sources.txt: 66 * WebCore.xcodeproj/project.pbxproj: 67 68 * bindings/js/JSDOMConvertPromise.h: 69 (WebCore::Converter<IDLPromise<T>>::convert): 70 Update Converter<IDLPromise<T>>::convert() to deal with worker termination similarly to 71 what is done is some other places (e.g. DeferredPromise::handleTerminationExceptionIfNeeded(()). 72 I had to make this fix because one of the WPT tests was hitting a debug assertions in JSC on 73 worker termination otherwise. 74 75 * page/NavigatorBase.cpp: 76 (WebCore::NavigatorBase::locks): 77 1 78 2021-11-29 Wenson Hsieh <wenson_hsieh@apple.com> 2 79 -
trunk/Source/WebCore/DerivedSources-input.xcfilelist
r286019 r286284 641 641 $(PROJECT_DIR)/Modules/web-locks/WebLockGrantedCallback.idl 642 642 $(PROJECT_DIR)/Modules/web-locks/WebLockManager.idl 643 $(PROJECT_DIR)/Modules/web-locks/WebLockManagerSnapshot.idl 643 644 $(PROJECT_DIR)/Modules/web-locks/WebLockMode.idl 644 645 $(PROJECT_DIR)/Modules/webaudio/AnalyserNode.idl -
trunk/Source/WebCore/DerivedSources-output.xcfilelist
r286019 r286284 2714 2714 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSWebLockManager.cpp 2715 2715 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSWebLockManager.h 2716 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSWebLockManagerSnapshot.cpp 2717 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSWebLockManagerSnapshot.h 2716 2718 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSWebLockMode.cpp 2717 2719 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSWebLockMode.h -
trunk/Source/WebCore/DerivedSources.make
r286019 r286284 544 544 $(WebCore)/Modules/web-locks/WebLockGrantedCallback.idl \ 545 545 $(WebCore)/Modules/web-locks/WebLockManager.idl \ 546 $(WebCore)/Modules/web-locks/WebLockManagerSnapshot.idl \ 546 547 $(WebCore)/Modules/web-locks/WebLockMode.idl \ 547 548 $(WebCore)/Modules/webaudio/AnalyserNode.idl \ -
trunk/Source/WebCore/Modules/web-locks/WebLock.cpp
r285012 r286284 28 28 namespace WebCore { 29 29 30 Ref<WebLock> WebLock::create( const String& name, WebLockMode mode)30 Ref<WebLock> WebLock::create(WebLockIdentifier identifier, const String& name, WebLockMode mode) 31 31 { 32 return adoptRef(*new WebLock( name, mode));32 return adoptRef(*new WebLock(identifier, name, mode)); 33 33 } 34 34 35 WebLock::WebLock(const String& name, WebLockMode mode) 36 : m_name(name) 35 WebLock::WebLock(WebLockIdentifier identifier, const String& name, WebLockMode mode) 36 : m_identifier(identifier) 37 , m_name(name) 37 38 , m_mode(mode) 38 39 { -
trunk/Source/WebCore/Modules/web-locks/WebLock.h
r285012 r286284 25 25 #pragma once 26 26 27 #include "ProcessQualified.h" 28 #include "WebLockIdentifier.h" 27 29 #include "WebLockMode.h" 28 30 #include <wtf/RefCounted.h> … … 33 35 class WebLock : public RefCounted<WebLock> { 34 36 public: 35 static Ref<WebLock> create( const String& name, WebLockMode);37 static Ref<WebLock> create(WebLockIdentifier, const String& name, WebLockMode); 36 38 39 WebLockIdentifier identifier() const { return m_identifier; } 37 40 const String& name() const { return m_name; } 38 41 WebLockMode mode() const { return m_mode; } 39 42 40 43 private: 41 WebLock( const String& name, WebLockMode);44 WebLock(WebLockIdentifier, const String& name, WebLockMode); 42 45 46 WebLockIdentifier m_identifier; 43 47 String m_name; 44 48 WebLockMode m_mode; -
trunk/Source/WebCore/Modules/web-locks/WebLockGrantedCallback.idl
r285012 r286284 23 23 */ 24 24 25 callback WebLockGrantedCallback = Promise<any> (WebLock? webLock); 25 [ 26 RethrowException 27 ] callback WebLockGrantedCallback = Promise<any> (WebLock? webLock); -
trunk/Source/WebCore/Modules/web-locks/WebLockIdentifier.h
r286283 r286284 23 23 */ 24 24 25 callback WebLockGrantedCallback = Promise<any> (WebLock? webLock); 25 #pragma once 26 27 #include <wtf/Forward.h> 28 29 namespace WebCore { 30 31 template<typename> class ProcessQualified; 32 33 enum WebLockIdentifierType { }; 34 using WebLockIdentifier = ProcessQualified<ObjectIdentifier<WebLockIdentifierType>>; 35 36 } // namespace 37 -
trunk/Source/WebCore/Modules/web-locks/WebLockManager.cpp
r285012 r286284 26 26 #include "WebLockManager.h" 27 27 28 #include "Document.h" 28 29 #include "ExceptionCode.h" 30 #include "ExceptionOr.h" 31 #include "JSDOMPromise.h" 32 #include "JSWebLockManagerSnapshot.h" 33 #include "NavigatorBase.h" 34 #include "SecurityOrigin.h" 29 35 #include "WebLockGrantedCallback.h" 36 #include "WebLockManagerSnapshot.h" 37 #include "WebLockRegistry.h" 38 #include <wtf/CompletionHandler.h> 39 #include <wtf/RunLoop.h> 30 40 31 41 namespace WebCore { 32 42 33 Ref<WebLockManager> WebLockManager::create() 34 { 35 return adoptRef(*new WebLockManager); 36 } 37 38 WebLockManager::WebLockManager() 39 { 40 } 41 42 void WebLockManager::request(const String& name, Ref<WebLockGrantedCallback>&&, Ref<DeferredPromise>&& promise) 43 static std::optional<ClientOrigin> clientOriginFromContext(ScriptExecutionContext* context) 44 { 45 if (!context) 46 return std::nullopt; 47 auto* origin = context->securityOrigin(); 48 if (!origin || origin->isUnique()) 49 return std::nullopt; 50 return { { context->topOrigin().data(), origin->data() } }; 51 } 52 53 struct WebLockManager::LockRequest { 54 WebLockIdentifier lockIdentifier; 55 String name; 56 WebLockMode mode { WebLockMode::Exclusive }; 57 RefPtr<WebLockGrantedCallback> grantedCallback; 58 RefPtr<AbortSignal> signal; 59 60 bool isValid() const { return !!lockIdentifier; } 61 }; 62 63 Ref<WebLockManager> WebLockManager::create(NavigatorBase& navigator) 64 { 65 auto manager = adoptRef(*new WebLockManager(navigator)); 66 manager->suspendIfNeeded(); 67 return manager; 68 } 69 70 WebLockManager::WebLockManager(NavigatorBase& navigator) 71 : ActiveDOMObject(navigator.scriptExecutionContext()) 72 , m_clientOrigin(clientOriginFromContext(navigator.scriptExecutionContext())) 73 { 74 } 75 76 WebLockManager::~WebLockManager() 77 { 78 clientIsGoingAway(); 79 } 80 81 void WebLockManager::request(const String& name, Ref<WebLockGrantedCallback>&& grantedCallback, Ref<DeferredPromise>&& promise) 82 { 83 request(name, { }, WTFMove(grantedCallback), WTFMove(promise)); 84 } 85 86 void WebLockManager::request(const String& name, Options&& options, Ref<WebLockGrantedCallback>&& grantedCallback, Ref<DeferredPromise>&& releasePromise) 43 87 { 44 88 UNUSED_PARAM(name); 45 promise->reject(NotSupportedError); 46 } 47 48 void WebLockManager::request(const String& name, Options&&, Ref<WebLockGrantedCallback>&&, Ref<DeferredPromise>&& promise) 49 { 50 UNUSED_PARAM(name); 51 promise->reject(NotSupportedError); 89 if (!scriptExecutionContext()) { 90 releasePromise->reject(InvalidStateError, "Context is invalid"_s); 91 return; 92 } 93 auto& context = *scriptExecutionContext(); 94 if ((is<Document>(context) && !downcast<Document>(context).isFullyActive())) { 95 releasePromise->reject(InvalidStateError, "Responsible document is not fully active"_s); 96 return; 97 } 98 99 if (!m_clientOrigin) { 100 releasePromise->reject(SecurityError, "Context's origin is opaque"_s); 101 return; 102 } 103 104 if (name.startsWith('-')) { 105 releasePromise->reject(NotSupportedError, "Lock name cannot start with '-'"_s); 106 return; 107 } 108 109 if (options.steal && options.ifAvailable) { 110 releasePromise->reject(NotSupportedError, "WebLockOptions's steal and ifAvailable cannot both be true"_s); 111 return; 112 } 113 114 if (options.steal && options.mode != WebLockMode::Exclusive) { 115 releasePromise->reject(NotSupportedError, "WebLockOptions's steal is true but mode is not 'exclusive'"_s); 116 return; 117 } 118 119 if (options.signal && (options.steal || options.ifAvailable)) { 120 releasePromise->reject(NotSupportedError, "WebLockOptions's steal and ifAvailable need to be false when a signal is provided"_s); 121 return; 122 } 123 124 if (options.signal && options.signal->aborted()) { 125 releasePromise->reject(AbortError, "WebLockOptions's signal is aborted"_s); 126 return; 127 } 128 129 WebLockIdentifier lockIdentifier = WebLockIdentifier::generateThreadSafe(); 130 m_releasePromises.add(lockIdentifier, WTFMove(releasePromise)); 131 132 if (options.signal) { 133 options.signal->addAlgorithm([weakThis = WeakPtr { *this }, lockIdentifier]() mutable { 134 if (weakThis) 135 weakThis->signalToAbortTheRequest(lockIdentifier); 136 }); 137 } 138 139 m_pendingRequests.add(lockIdentifier, LockRequest { lockIdentifier, name, options.mode, WTFMove(grantedCallback), WTFMove(options.signal) }); 140 141 requestLockOnMainThread(lockIdentifier, name, options, [weakThis = WeakPtr { *this }, lockIdentifier](bool success) mutable { 142 if (weakThis) 143 weakThis->didCompleteLockRequest(lockIdentifier, success); 144 }, [weakThis = WeakPtr { *this }, lockIdentifier](Exception&& exception) mutable { 145 if (weakThis) 146 weakThis->settleReleasePromise(lockIdentifier, WTFMove(exception)); 147 }); 148 } 149 150 void WebLockManager::didCompleteLockRequest(WebLockIdentifier lockIdentifier, bool success) 151 { 152 queueTaskKeepingObjectAlive(*this, TaskSource::DOMManipulation, [this, weakThis = WeakPtr { *this }, lockIdentifier, success]() mutable { 153 auto request = m_pendingRequests.take(lockIdentifier); 154 if (!request.isValid()) 155 return; 156 157 if (success) { 158 if (request.signal && request.signal->aborted()) { 159 releaseLockOnMainThread(request.lockIdentifier, request.name); 160 return; 161 } 162 163 auto lock = WebLock::create(request.lockIdentifier, request.name, request.mode); 164 auto result = request.grantedCallback->handleEvent(lock.ptr()); 165 RefPtr<DOMPromise> waitingPromise = result.type() == CallbackResultType::Success ? result.releaseReturnValue() : nullptr; 166 if (!waitingPromise) { 167 releaseLockOnMainThread(request.lockIdentifier, request.name); 168 settleReleasePromise(request.lockIdentifier, Exception { ExistingExceptionError }); 169 return; 170 } 171 172 DOMPromise::whenPromiseIsSettled(waitingPromise->globalObject(), waitingPromise->promise(), [this, weakThis = WTFMove(weakThis), lockIdentifier = request.lockIdentifier, name = request.name, waitingPromise] { 173 if (!weakThis) 174 return; 175 releaseLockOnMainThread(lockIdentifier, name); 176 settleReleasePromise(lockIdentifier, static_cast<JSC::JSValue>(waitingPromise->promise())); 177 }); 178 } else { 179 auto result = request.grantedCallback->handleEvent(nullptr); 180 RefPtr<DOMPromise> waitingPromise = result.type() == CallbackResultType::Success ? result.releaseReturnValue() : nullptr; 181 if (!waitingPromise) { 182 settleReleasePromise(request.lockIdentifier, Exception { ExistingExceptionError }); 183 return; 184 } 185 settleReleasePromise(request.lockIdentifier, static_cast<JSC::JSValue>(waitingPromise->promise())); 186 } 187 }); 188 } 189 190 void WebLockManager::requestLockOnMainThread(WebLockIdentifier lockIdentifier, const String& name, const Options& options, Function<void(bool)>&& grantedHandler, Function<void(Exception&&)>&& releaseHandler) 191 { 192 ensureOnMainThread([contextIdentifier = scriptExecutionContext()->identifier(), clientOrigin = crossThreadCopy(*m_clientOrigin), name = crossThreadCopy(name), mode = options.mode, steal = options.steal, ifAvailable = options.ifAvailable, lockIdentifier, grantedHandler = WTFMove(grantedHandler), releaseHandler = WTFMove(releaseHandler)]() mutable { 193 WebLockRegistry::registryForOrigin(clientOrigin)->requestLock(lockIdentifier, contextIdentifier, name, mode, steal, ifAvailable, [contextIdentifier, grantedHandler = WTFMove(grantedHandler)] (bool success) mutable { 194 ScriptExecutionContext::ensureOnContextThread(contextIdentifier, [grantedHandler = WTFMove(grantedHandler), success](auto&) mutable { 195 grantedHandler(success); 196 }); 197 }, [contextIdentifier, releaseHandler = WTFMove(releaseHandler)](Exception&& exception) mutable { 198 ScriptExecutionContext::ensureOnContextThread(contextIdentifier, [releaseHandler = WTFMove(releaseHandler), exception = crossThreadCopy(exception)](auto&) mutable { 199 releaseHandler(WTFMove(exception)); 200 }); 201 }); 202 }); 203 } 204 205 void WebLockManager::releaseLockOnMainThread(WebLockIdentifier lockIdentifier, const String& name) 206 { 207 ensureOnMainThread([clientOrigin = crossThreadCopy(*m_clientOrigin), lockIdentifier, name = crossThreadCopy(name)] { 208 WebLockRegistry::registryForOrigin(clientOrigin)->releaseLock(lockIdentifier, name); 209 }); 210 } 211 212 void WebLockManager::abortLockRequestOnMainThread(WebLockIdentifier lockIdentifier, const String& name, CompletionHandler<void(bool)>&& completionHandler) 213 { 214 ensureOnMainThread([contextIdentifier = scriptExecutionContext()->identifier(), clientOrigin = crossThreadCopy(*m_clientOrigin), lockIdentifier, name = crossThreadCopy(name), completionHandler = WTFMove(completionHandler)]() mutable { 215 WebLockRegistry::registryForOrigin(clientOrigin)->abortLockRequest(lockIdentifier, name, [contextIdentifier, completionHandler = WTFMove(completionHandler)](bool wasAborted) mutable { 216 ScriptExecutionContext::ensureOnContextThread(contextIdentifier, [completionHandler = WTFMove(completionHandler), wasAborted](auto&) mutable { 217 completionHandler(wasAborted); 218 }); 219 }); 220 }); 221 } 222 223 void WebLockManager::queryOnMainThread(CompletionHandler<void(Snapshot&&)>&& completionHandler) 224 { 225 ensureOnMainThread([contextIdentifier = scriptExecutionContext()->identifier(), clientOrigin = crossThreadCopy(*m_clientOrigin), completionHandler = WTFMove(completionHandler)]() mutable { 226 WebLockRegistry::registryForOrigin(clientOrigin)->snapshot([contextIdentifier, completionHandler = WTFMove(completionHandler)](Snapshot&& snapshot) mutable { 227 ScriptExecutionContext::ensureOnContextThread(contextIdentifier, [completionHandler = WTFMove(completionHandler), snapshot = crossThreadCopy(snapshot)](auto&) mutable { 228 completionHandler(WTFMove(snapshot)); 229 }); 230 }); 231 }); 52 232 } 53 233 54 234 void WebLockManager::query(Ref<DeferredPromise>&& promise) 55 235 { 56 promise->reject(NotSupportedError); 236 if (!scriptExecutionContext()) { 237 promise->reject(InvalidStateError, "Context is invalid"_s); 238 return; 239 } 240 auto& context = *scriptExecutionContext(); 241 if ((is<Document>(context) && !downcast<Document>(context).isFullyActive())) { 242 promise->reject(InvalidStateError, "Responsible document is not fully active"_s); 243 return; 244 } 245 246 if (!m_clientOrigin) { 247 promise->reject(SecurityError, "Context's origin is opaque"_s); 248 return; 249 } 250 251 queryOnMainThread([weakThis = WeakPtr { *this }, promise = WTFMove(promise)](Snapshot&& snapshot) mutable { 252 if (!weakThis) 253 return; 254 255 weakThis->queueTaskKeepingObjectAlive(*weakThis, TaskSource::DOMManipulation, [promise = WTFMove(promise), snapshot = WTFMove(snapshot)]() mutable { 256 promise->resolve<IDLDictionary<Snapshot>>(WTFMove(snapshot)); 257 }); 258 }); 259 } 260 261 // https://wicg.github.io/web-locks/#signal-to-abort-the-request 262 void WebLockManager::signalToAbortTheRequest(WebLockIdentifier lockIdentifier) 263 { 264 if (!scriptExecutionContext()) 265 return; 266 267 auto requestsIterator = m_pendingRequests.find(lockIdentifier); 268 if (requestsIterator == m_pendingRequests.end()) 269 return; 270 auto& request = requestsIterator->value; 271 272 abortLockRequestOnMainThread(request.lockIdentifier, request.name, [weakThis = WeakPtr { *this }, lockIdentifier](bool wasAborted) { 273 if (wasAborted && weakThis) 274 weakThis->m_pendingRequests.remove(lockIdentifier); 275 }); 276 settleReleasePromise(lockIdentifier, Exception { AbortError, "Lock request was aborted via AbortSignal" }); 277 } 278 279 void WebLockManager::settleReleasePromise(WebLockIdentifier lockIdentifier, ExceptionOr<JSC::JSValue>&& result) 280 { 281 auto releasePromise = m_releasePromises.take(lockIdentifier); 282 if (!releasePromise) 283 return; 284 285 if (result.hasException()) 286 releasePromise->reject(result.releaseException()); 287 else 288 releasePromise->resolveWithJSValue(result.releaseReturnValue()); 289 } 290 291 void WebLockManager::stop() 292 { 293 clientIsGoingAway(); 294 } 295 296 void WebLockManager::clientIsGoingAway() 297 { 298 if (m_pendingRequests.isEmpty() && m_releasePromises.isEmpty()) 299 return; 300 301 m_pendingRequests.clear(); 302 m_releasePromises.clear(); 303 304 ensureOnMainThread([clientOrigin = crossThreadCopy(*m_clientOrigin), contextIdentifier = scriptExecutionContext()->identifier()] { 305 WebLockRegistry::registryForOrigin(clientOrigin)->clientIsGoingAway(contextIdentifier); 306 }); 307 } 308 309 bool WebLockManager::virtualHasPendingActivity() const 310 { 311 return !m_pendingRequests.isEmpty() || !m_releasePromises.isEmpty(); 312 } 313 314 const char* WebLockManager::activeDOMObjectName() const 315 { 316 return "WebLockManager"; 57 317 } 58 318 -
trunk/Source/WebCore/Modules/web-locks/WebLockManager.h
r285012 r286284 26 26 27 27 #include "AbortSignal.h" 28 #include "ActiveDOMObject.h" 29 #include "ClientOrigin.h" 30 #include "WebLockIdentifier.h" 28 31 #include "WebLockMode.h" 29 32 #include <wtf/RefCounted.h> 33 #include <wtf/WeakPtr.h> 30 34 31 35 namespace WebCore { 32 36 33 37 class DeferredPromise; 38 class NavigatorBase; 34 39 class WebLockGrantedCallback; 35 40 36 class WebLockManager : public RefCounted<WebLockManager> { 41 struct ClientOrigin; 42 struct WebLockManagerSnapshot; 43 44 class WebLockManager : public RefCounted<WebLockManager>, public CanMakeWeakPtr<WebLockManager>, public ActiveDOMObject { 37 45 public: 38 static Ref<WebLockManager> create(); 46 static Ref<WebLockManager> create(NavigatorBase&); 47 ~WebLockManager(); 39 48 40 49 struct Options { … … 45 54 }; 46 55 47 struct Info { 48 String name; 49 WebLockMode mode { WebLockMode::Exclusive }; 50 String clientId; 51 }; 52 53 struct Snapshot { 54 Vector<Info> held; 55 Vector<Info> pending; 56 }; 56 using Snapshot = WebLockManagerSnapshot; 57 57 58 58 void request(const String& name, Ref<WebLockGrantedCallback>&&, Ref<DeferredPromise>&&); 59 59 void request(const String& name, Options&&, Ref<WebLockGrantedCallback>&&, Ref<DeferredPromise>&&); 60 61 60 void query(Ref<DeferredPromise>&&); 62 61 63 62 private: 64 WebLockManager(); 63 explicit WebLockManager(NavigatorBase&); 64 65 void requestLockOnMainThread(WebLockIdentifier, const String& name, const Options&, Function<void(bool)>&&, Function<void(Exception&&)>&& releaseHandler); 66 void releaseLockOnMainThread(WebLockIdentifier, const String& name); 67 void abortLockRequestOnMainThread(WebLockIdentifier, const String& name, CompletionHandler<void(bool)>&&); 68 void queryOnMainThread(CompletionHandler<void(Snapshot&&)>&&); 69 70 void didCompleteLockRequest(WebLockIdentifier, bool success); 71 void settleReleasePromise(WebLockIdentifier, ExceptionOr<JSC::JSValue>&&); 72 void signalToAbortTheRequest(WebLockIdentifier); 73 void clientIsGoingAway(); 74 75 // ActiveDOMObject. 76 void stop() final; 77 const char* activeDOMObjectName() const final; 78 bool virtualHasPendingActivity() const final; 79 80 const std::optional<ClientOrigin> m_clientOrigin; 81 HashMap<WebLockIdentifier, RefPtr<DeferredPromise>> m_releasePromises; 82 83 struct LockRequest; 84 HashMap<WebLockIdentifier, LockRequest> m_pendingRequests; 65 85 }; 66 86 -
trunk/Source/WebCore/Modules/web-locks/WebLockManager.idl
r286218 r286284 24 24 25 25 [ 26 ActiveDOMObject, 26 27 EnabledBySetting=WebLocksAPIEnabled, 27 28 Exposed=(Window,Worker), 28 29 InterfaceName=LockManager, 29 ImplementationLacksVTable,30 30 SecureContext 31 31 ] interface WebLockManager { … … 42 42 AbortSignal signal; 43 43 }; 44 45 dictionary WebLockManagerSnapshot {46 sequence<WebLockInfo> held;47 sequence<WebLockInfo> pending;48 };49 50 dictionary WebLockInfo {51 DOMString name;52 WebLockMode mode;53 DOMString clientId;54 }; -
trunk/Source/WebCore/Modules/web-locks/WebLockManagerSnapshot.h
r286283 r286284 26 26 27 27 #include "WebLockMode.h" 28 #include <wtf/RefCounted.h> 28 #include <wtf/CrossThreadCopier.h> 29 #include <wtf/Vector.h> 29 30 #include <wtf/text/WTFString.h> 30 31 31 32 namespace WebCore { 32 33 33 class WebLock : public RefCounted<WebLock> { 34 public: 35 static Ref<WebLock> create(const String& name, WebLockMode); 34 struct WebLockManagerSnapshot { 35 struct Info { 36 String name; 37 WebLockMode mode { WebLockMode::Exclusive }; 38 String clientId; 36 39 37 const String& name() const { return m_name; }38 WebLockMode mode() const { return m_mode; }40 Info isolatedCopy() const { return { name.isolatedCopy(), mode, clientId.isolatedCopy() }; } 41 }; 39 42 40 private: 41 WebLock(const String& name, WebLockMode);43 Vector<Info> held; 44 Vector<Info> pending; 42 45 43 String m_name; 44 WebLockMode m_mode; 46 WebLockManagerSnapshot isolatedCopy() const { return { crossThreadCopy(held), crossThreadCopy(pending) }; } 45 47 }; 46 48 -
trunk/Source/WebCore/Modules/web-locks/WebLockManagerSnapshot.idl
r286283 r286284 23 23 */ 24 24 25 callback WebLockGrantedCallback = Promise<any> (WebLock? webLock); 25 [ 26 JSGenerateToJSObject 27 ] dictionary WebLockManagerSnapshot { 28 sequence<WebLockInfo> held; 29 sequence<WebLockInfo> pending; 30 }; 31 32 [ 33 JSGenerateToJSObject 34 ] dictionary WebLockInfo { 35 DOMString name; 36 WebLockMode mode; 37 DOMString clientId; 38 }; -
trunk/Source/WebCore/Modules/web-locks/WebLockRegistry.h
r286283 r286284 25 25 #pragma once 26 26 27 #include "ClientOrigin.h" 28 #include "ScriptExecutionContextIdentifier.h" 29 #include "WebLockIdentifier.h" 30 #include "WebLockManager.h" 27 31 #include "WebLockMode.h" 32 #include <wtf/Deque.h> 33 #include <wtf/HashMap.h> 28 34 #include <wtf/RefCounted.h> 35 #include <wtf/WeakPtr.h> 29 36 #include <wtf/text/WTFString.h> 30 37 31 38 namespace WebCore { 32 39 33 class WebLock : public RefCounted<WebLock> { 40 class Exception; 41 struct WebLockManagerSnapshot; 42 43 class WebLockRegistry : public RefCounted<WebLockRegistry>, public CanMakeWeakPtr<WebLockRegistry> { 34 44 public: 35 static Ref<WebLock> create(const String& name, WebLockMode); 45 static Ref<WebLockRegistry> registryForOrigin(const ClientOrigin&); 46 ~WebLockRegistry(); 36 47 37 const String& name() const { return m_name; } 38 WebLockMode mode() const { return m_mode; } 48 void requestLock(WebLockIdentifier, ScriptExecutionContextIdentifier, const String& name, WebLockMode, bool steal, bool ifAvailable, Function<void(bool)>&& grantedHandler, Function<void(Exception&&)>&& releaseHandler); 49 void releaseLock(WebLockIdentifier, const String& name); 50 void abortLockRequest(WebLockIdentifier, const String& name, CompletionHandler<void(bool)>&&); 51 void snapshot(CompletionHandler<void(WebLockManagerSnapshot&&)>&&); 52 void clientIsGoingAway(ScriptExecutionContextIdentifier); 39 53 40 54 private: 41 WebLock(const String& name, WebLockMode);55 explicit WebLockRegistry(const ClientOrigin&); 42 56 43 String m_name; 44 WebLockMode m_mode; 57 struct LockInfo; 58 struct LockRequest; 59 60 bool isGrantable(const LockRequest&) const; 61 void processLockRequestQueue(const String& name, Deque<LockRequest>&); 62 63 const ClientOrigin m_origin; 64 HashMap<String, Deque<LockRequest>> m_lockRequestQueueMap; 65 HashMap<String, Vector<LockInfo>> m_heldLocks; 45 66 }; 46 67 -
trunk/Source/WebCore/Sources.txt
r286203 r286284 289 289 Modules/web-locks/WebLock.cpp 290 290 Modules/web-locks/WebLockManager.cpp 291 Modules/web-locks/WebLockRegistry.cpp 291 292 Modules/webaudio/AnalyserNode.cpp 292 293 Modules/webaudio/AsyncAudioDecoder.cpp … … 4000 4001 JSWebLockGrantedCallback.cpp 4001 4002 JSWebLockManager.cpp 4003 JSWebLockManagerSnapshot.cpp 4002 4004 JSWebLockMode.cpp 4003 4005 JSWebSocket.cpp -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r286259 r286284 1319 1319 4644F7F9272A1C210055599E /* WebLockManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 4644F7F0272A1C160055599E /* WebLockManager.h */; }; 1320 1320 4644F7FA272A1C250055599E /* WebLock.h in Headers */ = {isa = PBXBuildFile; fileRef = 4644F7F3272A1C160055599E /* WebLock.h */; }; 1321 464CAF09274331A7003B9E41 /* WebLockRegistry.h in Headers */ = {isa = PBXBuildFile; fileRef = 464CAF0827433199003B9E41 /* WebLockRegistry.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1321 1322 4650AD1926FCCA650047F7AD /* WorkerThreadMode.h in Headers */ = {isa = PBXBuildFile; fileRef = 4650AD1726FCCA5A0047F7AD /* WorkerThreadMode.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1322 1323 465307D01DB6EE4800E4137C /* JSUIEventInit.h in Headers */ = {isa = PBXBuildFile; fileRef = 83E045EF1DAA104F00B0D8B9 /* JSUIEventInit.h */; }; … … 9105 9106 4644F7F4272A1C160055599E /* WebLockManager.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = WebLockManager.idl; sourceTree = "<group>"; }; 9106 9107 4644F7F5272A1C160055599E /* WebLockMode.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = WebLockMode.idl; sourceTree = "<group>"; }; 9108 464CAF0627433198003B9E41 /* WebLockRegistry.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = WebLockRegistry.cpp; sourceTree = "<group>"; }; 9109 464CAF0827433199003B9E41 /* WebLockRegistry.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebLockRegistry.h; sourceTree = "<group>"; }; 9107 9110 4650AD1726FCCA5A0047F7AD /* WorkerThreadMode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WorkerThreadMode.h; sourceTree = "<group>"; }; 9108 9111 465A8E781C8A24CE00E7D3E4 /* RuntimeApplicationChecksCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = RuntimeApplicationChecksCocoa.mm; sourceTree = "<group>"; }; … … 9122 9125 4672AA9726B0942100E6EC38 /* CrossOriginOpenerPolicy.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CrossOriginOpenerPolicy.h; sourceTree = "<group>"; }; 9123 9126 467302011C4EFE6600BCB357 /* IgnoreOpensDuringUnloadCountIncrementer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IgnoreOpensDuringUnloadCountIncrementer.h; sourceTree = "<group>"; }; 9127 467802B02747117B00DA9FB6 /* WebLockManagerSnapshot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebLockManagerSnapshot.h; sourceTree = "<group>"; }; 9128 467802B22747118500DA9FB6 /* WebLockIdentifier.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebLockIdentifier.h; sourceTree = "<group>"; }; 9124 9129 4682D1FF1F79782300C863DB /* StoredCredentialsPolicy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StoredCredentialsPolicy.h; sourceTree = "<group>"; }; 9125 9130 468344DC1EDDFA5F00B7795B /* DOMRectList.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = DOMRectList.idl; sourceTree = "<group>"; }; … … 9185 9190 46E0C0DD23C006B4005E47AE /* DragEvent.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = DragEvent.idl; sourceTree = "<group>"; }; 9186 9191 46E139F623D8B8E70075848E /* HTTPCookieAcceptPolicyCocoa.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTTPCookieAcceptPolicyCocoa.h; sourceTree = "<group>"; }; 9192 46E66ECB2747123400B22A38 /* WebLockManagerSnapshot.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = WebLockManagerSnapshot.idl; sourceTree = "<group>"; }; 9187 9193 46E791451F97E01700199739 /* JSVisibilityState.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSVisibilityState.cpp; sourceTree = "<group>"; }; 9188 9194 46E791461F97E01700199739 /* JSVisibilityState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSVisibilityState.h; sourceTree = "<group>"; }; … … 21283 21289 4644F7EE272A1C160055599E /* WebLockGrantedCallback.h */, 21284 21290 4644F7F2272A1C160055599E /* WebLockGrantedCallback.idl */, 21291 467802B22747118500DA9FB6 /* WebLockIdentifier.h */, 21285 21292 4644F7ED272A1C160055599E /* WebLockManager.cpp */, 21286 21293 4644F7F0272A1C160055599E /* WebLockManager.h */, 21287 21294 4644F7F4272A1C160055599E /* WebLockManager.idl */, 21295 467802B02747117B00DA9FB6 /* WebLockManagerSnapshot.h */, 21296 46E66ECB2747123400B22A38 /* WebLockManagerSnapshot.idl */, 21288 21297 4644F7EB272A1C160055599E /* WebLockMode.h */, 21289 21298 4644F7F5272A1C160055599E /* WebLockMode.idl */, 21299 464CAF0627433198003B9E41 /* WebLockRegistry.cpp */, 21300 464CAF0827433199003B9E41 /* WebLockRegistry.h */, 21290 21301 ); 21291 21302 path = "web-locks"; … … 37536 37547 4644F7F9272A1C210055599E /* WebLockManager.h in Headers */, 37537 37548 4644F7F7272A1C1B0055599E /* WebLockMode.h in Headers */, 37549 464CAF09274331A7003B9E41 /* WebLockRegistry.h in Headers */, 37538 37550 07F5CFF52582A51D00662EF5 /* WebMAudioUtilitiesCocoa.h in Headers */, 37539 37551 0709D78F1AE55554004E42F8 /* WebMediaSessionManager.h in Headers */, -
trunk/Source/WebCore/bindings/js/JSDOMConvertPromise.h
r285098 r286284 29 29 #include "JSDOMConvertBase.h" 30 30 #include "JSDOMPromise.h" 31 #include "WorkerGlobalScope.h" 31 32 32 33 namespace WebCore { … … 49 50 auto* promise = JSC::JSPromise::resolvedPromise(globalObject, value); 50 51 if (scope.exception()) { 52 auto* scriptExecutionContext = globalObject->scriptExecutionContext(); 53 if (is<WorkerGlobalScope>(scriptExecutionContext)) { 54 auto& scriptController = *downcast<WorkerGlobalScope>(*scriptExecutionContext).script(); 55 bool terminatorCausedException = vm.isTerminationException(scope.exception()); 56 if (terminatorCausedException || scriptController.isTerminatingExecution()) { 57 scriptController.forbidExecution(); 58 return nullptr; 59 } 60 } 51 61 exceptionThrower(lexicalGlobalObject, scope); 52 62 return nullptr; -
trunk/Source/WebCore/page/NavigatorBase.cpp
r285429 r286284 154 154 { 155 155 if (!m_webLockManager) 156 m_webLockManager = WebLockManager::create( );156 m_webLockManager = WebLockManager::create(*this); 157 157 158 158 return *m_webLockManager;
Note: See TracChangeset
for help on using the changeset viewer.