Diff
Modified: trunk/LayoutTests/ChangeLog (222691 => 222692)
--- trunk/LayoutTests/ChangeLog 2017-10-01 21:24:56 UTC (rev 222691)
+++ trunk/LayoutTests/ChangeLog 2017-10-01 22:32:58 UTC (rev 222692)
@@ -1,3 +1,14 @@
+2017-10-01 Sam Weinig <[email protected]>
+
+ Add support for DOM aborting (https://dom.spec.whatwg.org/#aborting-ongoing-activities)
+ https://bugs.webkit.org/show_bug.cgi?id=177718
+
+ Reviewed by Darin Adler.
+
+ * js/dom/global-constructors-attributes-dedicated-worker-expected.txt:
+
+ Update test results.
+
2017-09-30 Ryosuke Niwa <[email protected]>
Don't reveal file URL when pasting an image
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (222691 => 222692)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2017-10-01 21:24:56 UTC (rev 222691)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2017-10-01 22:32:58 UTC (rev 222692)
@@ -1,5 +1,23 @@
2017-10-01 Sam Weinig <[email protected]>
+ Add support for DOM aborting (https://dom.spec.whatwg.org/#aborting-ongoing-activities)
+ https://bugs.webkit.org/show_bug.cgi?id=177718
+
+ Reviewed by Darin Adler.
+
+ * web-platform-tests/dom/abort/event.any-expected.txt:
+ * web-platform-tests/dom/abort/event.any.worker-expected.txt:
+ * web-platform-tests/dom/interface-objects-expected.txt:
+ * web-platform-tests/dom/interfaces-expected.txt:
+ * web-platform-tests/fetch/api/abort/cache.https-expected.txt:
+ * web-platform-tests/fetch/api/abort/general.any-expected.txt:
+ * web-platform-tests/fetch/api/abort/general.any.worker-expected.txt:
+ * web-platform-tests/payment-request/interfaces.https-expected.txt:
+
+ Update test results.
+
+2017-10-01 Sam Weinig <[email protected]>
+
XMLHttpRequest's responseXML should be annotated with [Exposed=Window]
https://bugs.webkit.org/show_bug.cgi?id=177714
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/abort/event.any-expected.txt (222691 => 222692)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/abort/event.any-expected.txt 2017-10-01 21:24:56 UTC (rev 222691)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/abort/event.any-expected.txt 2017-10-01 22:32:58 UTC (rev 222692)
@@ -1,3 +1,3 @@
-FAIL AbortController() basics Can't find variable: AbortController
+PASS AbortController() basics
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/abort/event.any.worker-expected.txt (222691 => 222692)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/abort/event.any.worker-expected.txt 2017-10-01 21:24:56 UTC (rev 222691)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/abort/event.any.worker-expected.txt 2017-10-01 22:32:58 UTC (rev 222692)
@@ -1,3 +1,3 @@
-FAIL AbortController() basics Can't find variable: AbortController
+PASS AbortController() basics
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/interface-objects-expected.txt (222691 => 222692)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/interface-objects-expected.txt 2017-10-01 21:24:56 UTC (rev 222691)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/interface-objects-expected.txt 2017-10-01 22:32:58 UTC (rev 222692)
@@ -3,8 +3,8 @@
PASS Should be able to delete Event.
PASS Should be able to delete CustomEvent.
PASS Should be able to delete EventTarget.
-FAIL Should be able to delete AbortController. assert_true: Interface should exist. expected true got false
-FAIL Should be able to delete AbortSignal. assert_true: Interface should exist. expected true got false
+PASS Should be able to delete AbortController.
+PASS Should be able to delete AbortSignal.
PASS Should be able to delete Node.
PASS Should be able to delete Document.
PASS Should be able to delete DOMImplementation.
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/interfaces-expected.txt (222691 => 222692)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/interfaces-expected.txt 2017-10-01 21:24:56 UTC (rev 222691)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/interfaces-expected.txt 2017-10-01 22:32:58 UTC (rev 222692)
@@ -118,34 +118,34 @@
PASS EventListener interface: existence and properties of interface prototype object
PASS EventListener interface: existence and properties of interface prototype object's "constructor" property
PASS EventListener interface: operation handleEvent(Event)
-FAIL AbortController interface: existence and properties of interface object assert_own_property: self does not have own property "AbortController" expected property "AbortController" missing
-FAIL AbortController interface object length assert_own_property: self does not have own property "AbortController" expected property "AbortController" missing
-FAIL AbortController interface object name assert_own_property: self does not have own property "AbortController" expected property "AbortController" missing
-FAIL AbortController interface: existence and properties of interface prototype object assert_own_property: self does not have own property "AbortController" expected property "AbortController" missing
-FAIL AbortController interface: existence and properties of interface prototype object's "constructor" property assert_own_property: self does not have own property "AbortController" expected property "AbortController" missing
-FAIL AbortController interface: attribute signal assert_own_property: self does not have own property "AbortController" expected property "AbortController" missing
-FAIL AbortController interface: operation abort() assert_own_property: self does not have own property "AbortController" expected property "AbortController" missing
-FAIL AbortController must be primary interface of new AbortController() assert_equals: Unexpected exception when evaluating object expected null but got object "ReferenceError: Can't find variable: AbortController"
-FAIL Stringification of new AbortController() assert_equals: Unexpected exception when evaluating object expected null but got object "ReferenceError: Can't find variable: AbortController"
-FAIL AbortController interface: new AbortController() must inherit property "signal" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "ReferenceError: Can't find variable: AbortController"
-FAIL AbortController interface: new AbortController() must inherit property "abort()" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "ReferenceError: Can't find variable: AbortController"
-FAIL AbortSignal interface: existence and properties of interface object assert_own_property: self does not have own property "AbortSignal" expected property "AbortSignal" missing
-FAIL AbortSignal interface object length assert_own_property: self does not have own property "AbortSignal" expected property "AbortSignal" missing
-FAIL AbortSignal interface object name assert_own_property: self does not have own property "AbortSignal" expected property "AbortSignal" missing
-FAIL AbortSignal interface: existence and properties of interface prototype object assert_own_property: self does not have own property "AbortSignal" expected property "AbortSignal" missing
-FAIL AbortSignal interface: existence and properties of interface prototype object's "constructor" property assert_own_property: self does not have own property "AbortSignal" expected property "AbortSignal" missing
-FAIL AbortSignal interface: attribute aborted assert_own_property: self does not have own property "AbortSignal" expected property "AbortSignal" missing
-FAIL AbortSignal interface: attribute onabort assert_own_property: self does not have own property "AbortSignal" expected property "AbortSignal" missing
-FAIL AbortSignal must be primary interface of new AbortController().signal assert_equals: Unexpected exception when evaluating object expected null but got object "ReferenceError: Can't find variable: AbortController"
-FAIL Stringification of new AbortController().signal assert_equals: Unexpected exception when evaluating object expected null but got object "ReferenceError: Can't find variable: AbortController"
-FAIL AbortSignal interface: new AbortController().signal must inherit property "aborted" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "ReferenceError: Can't find variable: AbortController"
-FAIL AbortSignal interface: new AbortController().signal must inherit property "onabort" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "ReferenceError: Can't find variable: AbortController"
-FAIL EventTarget interface: new AbortController().signal must inherit property "addEventListener(DOMString, EventListener, [object Object],[object Object])" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "ReferenceError: Can't find variable: AbortController"
-FAIL EventTarget interface: calling addEventListener(DOMString, EventListener, [object Object],[object Object]) on new AbortController().signal with too few arguments must throw TypeError assert_equals: Unexpected exception when evaluating object expected null but got object "ReferenceError: Can't find variable: AbortController"
-FAIL EventTarget interface: new AbortController().signal must inherit property "removeEventListener(DOMString, EventListener, [object Object],[object Object])" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "ReferenceError: Can't find variable: AbortController"
-FAIL EventTarget interface: calling removeEventListener(DOMString, EventListener, [object Object],[object Object]) on new AbortController().signal with too few arguments must throw TypeError assert_equals: Unexpected exception when evaluating object expected null but got object "ReferenceError: Can't find variable: AbortController"
-FAIL EventTarget interface: new AbortController().signal must inherit property "dispatchEvent(Event)" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "ReferenceError: Can't find variable: AbortController"
-FAIL EventTarget interface: calling dispatchEvent(Event) on new AbortController().signal with too few arguments must throw TypeError assert_equals: Unexpected exception when evaluating object expected null but got object "ReferenceError: Can't find variable: AbortController"
+PASS AbortController interface: existence and properties of interface object
+PASS AbortController interface object length
+PASS AbortController interface object name
+PASS AbortController interface: existence and properties of interface prototype object
+PASS AbortController interface: existence and properties of interface prototype object's "constructor" property
+PASS AbortController interface: attribute signal
+PASS AbortController interface: operation abort()
+PASS AbortController must be primary interface of new AbortController()
+PASS Stringification of new AbortController()
+PASS AbortController interface: new AbortController() must inherit property "signal" with the proper type
+PASS AbortController interface: new AbortController() must inherit property "abort()" with the proper type
+PASS AbortSignal interface: existence and properties of interface object
+PASS AbortSignal interface object length
+PASS AbortSignal interface object name
+PASS AbortSignal interface: existence and properties of interface prototype object
+PASS AbortSignal interface: existence and properties of interface prototype object's "constructor" property
+PASS AbortSignal interface: attribute aborted
+PASS AbortSignal interface: attribute onabort
+PASS AbortSignal must be primary interface of new AbortController().signal
+PASS Stringification of new AbortController().signal
+PASS AbortSignal interface: new AbortController().signal must inherit property "aborted" with the proper type
+FAIL AbortSignal interface: new AbortController().signal must inherit property "onabort" with the proper type Unrecognized type EventHandler
+PASS EventTarget interface: new AbortController().signal must inherit property "addEventListener(DOMString, EventListener, [object Object],[object Object])" with the proper type
+PASS EventTarget interface: calling addEventListener(DOMString, EventListener, [object Object],[object Object]) on new AbortController().signal with too few arguments must throw TypeError
+PASS EventTarget interface: new AbortController().signal must inherit property "removeEventListener(DOMString, EventListener, [object Object],[object Object])" with the proper type
+PASS EventTarget interface: calling removeEventListener(DOMString, EventListener, [object Object],[object Object]) on new AbortController().signal with too few arguments must throw TypeError
+PASS EventTarget interface: new AbortController().signal must inherit property "dispatchEvent(Event)" with the proper type
+PASS EventTarget interface: calling dispatchEvent(Event) on new AbortController().signal with too few arguments must throw TypeError
PASS NodeList interface: existence and properties of interface object
PASS NodeList interface object length
PASS NodeList interface object name
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/abort/cache.https-expected.txt (222691 => 222692)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/abort/cache.https-expected.txt 2017-10-01 21:24:56 UTC (rev 222691)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/abort/cache.https-expected.txt 2017-10-01 22:32:58 UTC (rev 222692)
@@ -1,4 +1,4 @@
-FAIL Signals are not stored in the cache API promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: AbortController"
-FAIL Signals are not stored in the cache API, even if they're already aborted promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: AbortController"
+FAIL Signals are not stored in the cache API promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'cachedRequest.signal.aborted')"
+FAIL Signals are not stored in the cache API, even if they're already aborted promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'cachedRequest.signal.aborted')"
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/abort/general.any-expected.txt (222691 => 222692)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/abort/general.any-expected.txt 2017-10-01 21:24:56 UTC (rev 222691)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/abort/general.any-expected.txt 2017-10-01 22:32:58 UTC (rev 222692)
@@ -1,51 +1,57 @@
+Blocked access to external URL http://www1.localhost:8800/fetch/api/resources/data.json
+CONSOLE MESSAGE: line 36: Fetch API cannot load http://www1.localhost:8800/fetch/api/resources/data.json due to access control checks.
+Blocked access to external URL http://www1.localhost:8800/fetch/api/resources/infinite-slow-response.py?stateKey=28d5c068-417e-4c81-a0cd-9b8c22aed3c1&abortKey=ef9a1b5a-7afd-4734-b145-f033788c0e6b
+CONSOLE MESSAGE: line 318: Fetch API cannot load http://www1.localhost:8800/fetch/api/resources/infinite-slow-response.py?stateKey=28d5c068-417e-4c81-a0cd-9b8c22aed3c1&abortKey=ef9a1b5a-7afd-4734-b145-f033788c0e6b due to access control checks.
-FAIL Aborting rejects with AbortError promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: AbortController"
-FAIL Aborting rejects with AbortError - no-cors promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: AbortController"
-FAIL TypeError from request constructor takes priority - RequestInit's window is not null promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: AbortController"
-FAIL TypeError from request constructor takes priority - Input URL is not valid promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: AbortController"
-FAIL TypeError from request constructor takes priority - Input URL has credentials promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: AbortController"
-FAIL TypeError from request constructor takes priority - RequestInit's mode is navigate promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: AbortController"
-FAIL TypeError from request constructor takes priority - RequestInit's referrer is invalid promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: AbortController"
-FAIL TypeError from request constructor takes priority - RequestInit's method is invalid promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: AbortController"
-FAIL TypeError from request constructor takes priority - RequestInit's method is forbidden promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: AbortController"
-FAIL TypeError from request constructor takes priority - RequestInit's mode is no-cors and method is not simple promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: AbortController"
-FAIL TypeError from request constructor takes priority - RequestInit's mode is no-cors and integrity is not empty promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: AbortController"
-FAIL TypeError from request constructor takes priority - RequestInit's cache mode is only-if-cached and mode is not same-origin promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: AbortController"
-FAIL TypeError from request constructor takes priority - Request with cache mode: only-if-cached and fetch mode cors promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: AbortController"
-FAIL TypeError from request constructor takes priority - Request with cache mode: only-if-cached and fetch mode no-cors promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: AbortController"
-FAIL TypeError from request constructor takes priority - Bad referrerPolicy init parameter value promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: AbortController"
-FAIL TypeError from request constructor takes priority - Bad mode init parameter value promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: AbortController"
-FAIL TypeError from request constructor takes priority - Bad credentials init parameter value promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: AbortController"
-FAIL TypeError from request constructor takes priority - Bad cache init parameter value promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: AbortController"
-FAIL TypeError from request constructor takes priority - Bad redirect init parameter value promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: AbortController"
+Harness Error (TIMEOUT), message = null
+
+FAIL Aborting rejects with AbortError assert_unreached: Should have rejected: undefined Reached unreachable code
+FAIL Aborting rejects with AbortError - no-cors assert_throws: function "function () { throw e }" threw object "TypeError: Type error" that is not a DOMException AbortError: property "code" is equal to undefined, expected 20
+PASS TypeError from request constructor takes priority - RequestInit's window is not null
+PASS TypeError from request constructor takes priority - Input URL is not valid
+PASS TypeError from request constructor takes priority - Input URL has credentials
+PASS TypeError from request constructor takes priority - RequestInit's mode is navigate
+PASS TypeError from request constructor takes priority - RequestInit's referrer is invalid
+PASS TypeError from request constructor takes priority - RequestInit's method is invalid
+PASS TypeError from request constructor takes priority - RequestInit's method is forbidden
+PASS TypeError from request constructor takes priority - RequestInit's mode is no-cors and method is not simple
+PASS TypeError from request constructor takes priority - RequestInit's mode is no-cors and integrity is not empty
+PASS TypeError from request constructor takes priority - RequestInit's cache mode is only-if-cached and mode is not same-origin
+PASS TypeError from request constructor takes priority - Request with cache mode: only-if-cached and fetch mode cors
+PASS TypeError from request constructor takes priority - Request with cache mode: only-if-cached and fetch mode no-cors
+PASS TypeError from request constructor takes priority - Bad referrerPolicy init parameter value
+PASS TypeError from request constructor takes priority - Bad mode init parameter value
+PASS TypeError from request constructor takes priority - Bad credentials init parameter value
+PASS TypeError from request constructor takes priority - Bad cache init parameter value
+PASS TypeError from request constructor takes priority - Bad redirect init parameter value
FAIL Request objects have a signal property assert_true: Signal member is present & truthy expected true got false
-FAIL Signal on request object promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: AbortController"
-FAIL Signal on request object created from request object promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: AbortController"
-FAIL Signal on request object created from request object, with signal on second request promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: AbortController"
-FAIL Signal on request object created from request object, with signal on second request overriding another promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: AbortController"
-FAIL Signal retained after unrelated properties are overridden by fetch promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: AbortController"
-FAIL Signal removed by setting to null promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: AbortController"
-FAIL Already aborted signal rejects immediately promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: AbortController"
-FAIL Request is still 'used' if signal is aborted before fetching promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: AbortController"
-FAIL response.arrayBuffer() rejects if already aborted promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: AbortController"
-FAIL response.blob() rejects if already aborted promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: AbortController"
-FAIL response.formData() rejects if already aborted promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: AbortController"
-FAIL response.json() rejects if already aborted promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: AbortController"
-FAIL response.text() rejects if already aborted promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: AbortController"
-FAIL Already aborted signal does not make request promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: AbortController"
-FAIL Already aborted signal can be used for many fetches promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: AbortController"
-FAIL Signal can be used to abort other fetches, even if another fetch succeeded before aborting promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: AbortController"
-FAIL Underlying connection is closed when aborting after receiving response promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: AbortController"
-FAIL Underlying connection is closed when aborting after receiving response - no-cors promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: AbortController"
-FAIL Fetch aborted & connection closed when aborted after calling response.arrayBuffer() promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: AbortController"
-FAIL Fetch aborted & connection closed when aborted after calling response.blob() promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: AbortController"
-FAIL Fetch aborted & connection closed when aborted after calling response.formData() promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: AbortController"
-FAIL Fetch aborted & connection closed when aborted after calling response.json() promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: AbortController"
-FAIL Fetch aborted & connection closed when aborted after calling response.text() promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: AbortController"
-FAIL Stream errors once aborted. Underlying connection closed. promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: AbortController"
-FAIL Stream errors once aborted, after reading. Underlying connection closed. promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: AbortController"
-FAIL Stream will not error if body is empty. It's closed with an empty queue before it errors. promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: AbortController"
-FAIL Readable stream synchronously cancels with AbortError if aborted before reading promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: AbortController"
-FAIL Signal state is cloned Can't find variable: AbortController
-FAIL Clone aborts with original controller Can't find variable: AbortController
+FAIL Signal on request object assert_true: Signal member is present & truthy expected true got false
+FAIL Signal on request object created from request object assert_unreached: Should have rejected: undefined Reached unreachable code
+FAIL Signal on request object created from request object, with signal on second request assert_unreached: Should have rejected: undefined Reached unreachable code
+FAIL Signal on request object created from request object, with signal on second request overriding another assert_unreached: Should have rejected: undefined Reached unreachable code
+FAIL Signal retained after unrelated properties are overridden by fetch assert_unreached: Should have rejected: undefined Reached unreachable code
+PASS Signal removed by setting to null
+FAIL Already aborted signal rejects immediately assert_unreached: Fetch must not resolve Reached unreachable code
+PASS Request is still 'used' if signal is aborted before fetching
+FAIL response.arrayBuffer() rejects if already aborted assert_unreached: Should have rejected: undefined Reached unreachable code
+FAIL response.blob() rejects if already aborted assert_unreached: Should have rejected: undefined Reached unreachable code
+FAIL response.formData() rejects if already aborted assert_throws: 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
+FAIL response.json() rejects if already aborted assert_unreached: Should have rejected: undefined Reached unreachable code
+FAIL response.text() rejects if already aborted assert_unreached: Should have rejected: undefined Reached unreachable code
+FAIL Already aborted signal does not make request assert_equals: Request hasn't been made to the server expected (object) null but got (string) "open"
+FAIL Already aborted signal can be used for many fetches assert_unreached: Should have rejected: undefined Reached unreachable code
+FAIL Signal can be used to abort other fetches, even if another fetch succeeded before aborting assert_unreached: Should have rejected: undefined Reached unreachable code
+FAIL Underlying connection is closed when aborting after receiving response promise_test: Unhandled rejection with value: object "Error: Timed out"
+FAIL Underlying connection is closed when aborting after receiving response - no-cors promise_test: Unhandled rejection with value: object "TypeError: Type error"
+TIMEOUT Fetch aborted & connection closed when aborted after calling response.arrayBuffer() Test timed out
+NOTRUN Fetch aborted & connection closed when aborted after calling response.blob()
+NOTRUN Fetch aborted & connection closed when aborted after calling response.formData()
+NOTRUN Fetch aborted & connection closed when aborted after calling response.json()
+NOTRUN Fetch aborted & connection closed when aborted after calling response.text()
+NOTRUN Stream errors once aborted. Underlying connection closed.
+NOTRUN Stream errors once aborted, after reading. Underlying connection closed.
+NOTRUN Stream will not error if body is empty. It's closed with an empty queue before it errors.
+NOTRUN Readable stream synchronously cancels with AbortError if aborted before reading
+FAIL Signal state is cloned undefined is not an object (evaluating 'request.signal.aborted')
+FAIL Clone aborts with original controller undefined is not an object (evaluating 'request.signal.addEventListener')
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/abort/general.any.worker-expected.txt (222691 => 222692)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/abort/general.any.worker-expected.txt 2017-10-01 21:24:56 UTC (rev 222691)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/abort/general.any.worker-expected.txt 2017-10-01 22:32:58 UTC (rev 222692)
@@ -1,51 +1,55 @@
+Blocked access to external URL http://www1.localhost:8800/fetch/api/resources/data.json
+Blocked access to external URL http://www1.localhost:8800/fetch/api/resources/infinite-slow-response.py?stateKey=7471d98e-1bdb-4254-a315-9489c98b8f59&abortKey=4c631f17-2786-4b07-84f4-0a5760d28f1e
-FAIL Aborting rejects with AbortError promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: AbortController"
-FAIL Aborting rejects with AbortError - no-cors promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: AbortController"
-FAIL TypeError from request constructor takes priority - RequestInit's window is not null promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: AbortController"
-FAIL TypeError from request constructor takes priority - Input URL is not valid promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: AbortController"
-FAIL TypeError from request constructor takes priority - Input URL has credentials promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: AbortController"
-FAIL TypeError from request constructor takes priority - RequestInit's mode is navigate promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: AbortController"
-FAIL TypeError from request constructor takes priority - RequestInit's referrer is invalid promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: AbortController"
-FAIL TypeError from request constructor takes priority - RequestInit's method is invalid promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: AbortController"
-FAIL TypeError from request constructor takes priority - RequestInit's method is forbidden promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: AbortController"
-FAIL TypeError from request constructor takes priority - RequestInit's mode is no-cors and method is not simple promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: AbortController"
-FAIL TypeError from request constructor takes priority - RequestInit's mode is no-cors and integrity is not empty promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: AbortController"
-FAIL TypeError from request constructor takes priority - RequestInit's cache mode is only-if-cached and mode is not same-origin promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: AbortController"
-FAIL TypeError from request constructor takes priority - Request with cache mode: only-if-cached and fetch mode cors promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: AbortController"
-FAIL TypeError from request constructor takes priority - Request with cache mode: only-if-cached and fetch mode no-cors promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: AbortController"
-FAIL TypeError from request constructor takes priority - Bad referrerPolicy init parameter value promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: AbortController"
-FAIL TypeError from request constructor takes priority - Bad mode init parameter value promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: AbortController"
-FAIL TypeError from request constructor takes priority - Bad credentials init parameter value promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: AbortController"
-FAIL TypeError from request constructor takes priority - Bad cache init parameter value promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: AbortController"
-FAIL TypeError from request constructor takes priority - Bad redirect init parameter value promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: AbortController"
+Harness Error (TIMEOUT), message = null
+
+FAIL Aborting rejects with AbortError assert_unreached: Should have rejected: undefined Reached unreachable code
+FAIL Aborting rejects with AbortError - no-cors assert_throws: function "function () { throw e }" threw object "TypeError: Type error" that is not a DOMException AbortError: property "code" is equal to undefined, expected 20
+PASS TypeError from request constructor takes priority - RequestInit's window is not null
+PASS TypeError from request constructor takes priority - Input URL is not valid
+PASS TypeError from request constructor takes priority - Input URL has credentials
+PASS TypeError from request constructor takes priority - RequestInit's mode is navigate
+PASS TypeError from request constructor takes priority - RequestInit's referrer is invalid
+PASS TypeError from request constructor takes priority - RequestInit's method is invalid
+PASS TypeError from request constructor takes priority - RequestInit's method is forbidden
+PASS TypeError from request constructor takes priority - RequestInit's mode is no-cors and method is not simple
+PASS TypeError from request constructor takes priority - RequestInit's mode is no-cors and integrity is not empty
+PASS TypeError from request constructor takes priority - RequestInit's cache mode is only-if-cached and mode is not same-origin
+PASS TypeError from request constructor takes priority - Request with cache mode: only-if-cached and fetch mode cors
+PASS TypeError from request constructor takes priority - Request with cache mode: only-if-cached and fetch mode no-cors
+PASS TypeError from request constructor takes priority - Bad referrerPolicy init parameter value
+PASS TypeError from request constructor takes priority - Bad mode init parameter value
+PASS TypeError from request constructor takes priority - Bad credentials init parameter value
+PASS TypeError from request constructor takes priority - Bad cache init parameter value
+PASS TypeError from request constructor takes priority - Bad redirect init parameter value
FAIL Request objects have a signal property assert_true: Signal member is present & truthy expected true got false
-FAIL Signal on request object promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: AbortController"
-FAIL Signal on request object created from request object promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: AbortController"
-FAIL Signal on request object created from request object, with signal on second request promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: AbortController"
-FAIL Signal on request object created from request object, with signal on second request overriding another promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: AbortController"
-FAIL Signal retained after unrelated properties are overridden by fetch promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: AbortController"
-FAIL Signal removed by setting to null promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: AbortController"
-FAIL Already aborted signal rejects immediately promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: AbortController"
-FAIL Request is still 'used' if signal is aborted before fetching promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: AbortController"
-FAIL response.arrayBuffer() rejects if already aborted promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: AbortController"
-FAIL response.blob() rejects if already aborted promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: AbortController"
-FAIL response.formData() rejects if already aborted promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: AbortController"
-FAIL response.json() rejects if already aborted promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: AbortController"
-FAIL response.text() rejects if already aborted promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: AbortController"
-FAIL Already aborted signal does not make request promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: AbortController"
-FAIL Already aborted signal can be used for many fetches promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: AbortController"
-FAIL Signal can be used to abort other fetches, even if another fetch succeeded before aborting promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: AbortController"
-FAIL Underlying connection is closed when aborting after receiving response promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: AbortController"
-FAIL Underlying connection is closed when aborting after receiving response - no-cors promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: AbortController"
-FAIL Fetch aborted & connection closed when aborted after calling response.arrayBuffer() promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: AbortController"
-FAIL Fetch aborted & connection closed when aborted after calling response.blob() promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: AbortController"
-FAIL Fetch aborted & connection closed when aborted after calling response.formData() promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: AbortController"
-FAIL Fetch aborted & connection closed when aborted after calling response.json() promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: AbortController"
-FAIL Fetch aborted & connection closed when aborted after calling response.text() promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: AbortController"
-FAIL Stream errors once aborted. Underlying connection closed. promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: AbortController"
-FAIL Stream errors once aborted, after reading. Underlying connection closed. promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: AbortController"
-FAIL Stream will not error if body is empty. It's closed with an empty queue before it errors. promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: AbortController"
-FAIL Readable stream synchronously cancels with AbortError if aborted before reading promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: AbortController"
-FAIL Signal state is cloned Can't find variable: AbortController
-FAIL Clone aborts with original controller Can't find variable: AbortController
+FAIL Signal on request object assert_true: Signal member is present & truthy expected true got false
+FAIL Signal on request object created from request object assert_unreached: Should have rejected: undefined Reached unreachable code
+FAIL Signal on request object created from request object, with signal on second request assert_unreached: Should have rejected: undefined Reached unreachable code
+FAIL Signal on request object created from request object, with signal on second request overriding another assert_unreached: Should have rejected: undefined Reached unreachable code
+FAIL Signal retained after unrelated properties are overridden by fetch assert_unreached: Should have rejected: undefined Reached unreachable code
+PASS Signal removed by setting to null
+FAIL Already aborted signal rejects immediately assert_unreached: Fetch must not resolve Reached unreachable code
+PASS Request is still 'used' if signal is aborted before fetching
+FAIL response.arrayBuffer() rejects if already aborted assert_unreached: Should have rejected: undefined Reached unreachable code
+FAIL response.blob() rejects if already aborted assert_unreached: Should have rejected: undefined Reached unreachable code
+FAIL response.formData() rejects if already aborted assert_throws: 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
+FAIL response.json() rejects if already aborted assert_unreached: Should have rejected: undefined Reached unreachable code
+FAIL response.text() rejects if already aborted assert_unreached: Should have rejected: undefined Reached unreachable code
+FAIL Already aborted signal does not make request assert_equals: Request hasn't been made to the server expected (object) null but got (string) "open"
+FAIL Already aborted signal can be used for many fetches assert_unreached: Should have rejected: undefined Reached unreachable code
+FAIL Signal can be used to abort other fetches, even if another fetch succeeded before aborting assert_unreached: Should have rejected: undefined Reached unreachable code
+FAIL Underlying connection is closed when aborting after receiving response promise_test: Unhandled rejection with value: object "Error: Timed out"
+FAIL Underlying connection is closed when aborting after receiving response - no-cors promise_test: Unhandled rejection with value: object "TypeError: Type error"
+TIMEOUT Fetch aborted & connection closed when aborted after calling response.arrayBuffer() Test timed out
+NOTRUN Fetch aborted & connection closed when aborted after calling response.blob()
+NOTRUN Fetch aborted & connection closed when aborted after calling response.formData()
+NOTRUN Fetch aborted & connection closed when aborted after calling response.json()
+NOTRUN Fetch aborted & connection closed when aborted after calling response.text()
+NOTRUN Stream errors once aborted. Underlying connection closed.
+NOTRUN Stream errors once aborted, after reading. Underlying connection closed.
+NOTRUN Stream will not error if body is empty. It's closed with an empty queue before it errors.
+NOTRUN Readable stream synchronously cancels with AbortError if aborted before reading
+FAIL Signal state is cloned undefined is not an object (evaluating 'request.signal.aborted')
+FAIL Clone aborts with original controller undefined is not an object (evaluating 'request.signal.addEventListener')
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/payment-request/interfaces.https-expected.txt (222691 => 222692)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/payment-request/interfaces.https-expected.txt 2017-10-01 21:24:56 UTC (rev 222691)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/payment-request/interfaces.https-expected.txt 2017-10-01 22:32:58 UTC (rev 222692)
@@ -46,20 +46,20 @@
PASS EventListener interface: existence and properties of interface prototype object
PASS EventListener interface: existence and properties of interface prototype object's "constructor" property
PASS EventListener interface: operation handleEvent(Event)
-FAIL AbortController interface: existence and properties of interface object assert_own_property: self does not have own property "AbortController" expected property "AbortController" missing
-FAIL AbortController interface object length assert_own_property: self does not have own property "AbortController" expected property "AbortController" missing
-FAIL AbortController interface object name assert_own_property: self does not have own property "AbortController" expected property "AbortController" missing
-FAIL AbortController interface: existence and properties of interface prototype object assert_own_property: self does not have own property "AbortController" expected property "AbortController" missing
-FAIL AbortController interface: existence and properties of interface prototype object's "constructor" property assert_own_property: self does not have own property "AbortController" expected property "AbortController" missing
-FAIL AbortController interface: attribute signal assert_own_property: self does not have own property "AbortController" expected property "AbortController" missing
-FAIL AbortController interface: operation abort() assert_own_property: self does not have own property "AbortController" expected property "AbortController" missing
-FAIL AbortSignal interface: existence and properties of interface object assert_own_property: self does not have own property "AbortSignal" expected property "AbortSignal" missing
-FAIL AbortSignal interface object length assert_own_property: self does not have own property "AbortSignal" expected property "AbortSignal" missing
-FAIL AbortSignal interface object name assert_own_property: self does not have own property "AbortSignal" expected property "AbortSignal" missing
-FAIL AbortSignal interface: existence and properties of interface prototype object assert_own_property: self does not have own property "AbortSignal" expected property "AbortSignal" missing
-FAIL AbortSignal interface: existence and properties of interface prototype object's "constructor" property assert_own_property: self does not have own property "AbortSignal" expected property "AbortSignal" missing
-FAIL AbortSignal interface: attribute aborted assert_own_property: self does not have own property "AbortSignal" expected property "AbortSignal" missing
-FAIL AbortSignal interface: attribute onabort assert_own_property: self does not have own property "AbortSignal" expected property "AbortSignal" missing
+PASS AbortController interface: existence and properties of interface object
+PASS AbortController interface object length
+PASS AbortController interface object name
+PASS AbortController interface: existence and properties of interface prototype object
+PASS AbortController interface: existence and properties of interface prototype object's "constructor" property
+PASS AbortController interface: attribute signal
+PASS AbortController interface: operation abort()
+PASS AbortSignal interface: existence and properties of interface object
+PASS AbortSignal interface object length
+PASS AbortSignal interface object name
+PASS AbortSignal interface: existence and properties of interface prototype object
+PASS AbortSignal interface: existence and properties of interface prototype object's "constructor" property
+PASS AbortSignal interface: attribute aborted
+PASS AbortSignal interface: attribute onabort
PASS NodeList interface: existence and properties of interface object
PASS NodeList interface object length
PASS NodeList interface object name
Modified: trunk/LayoutTests/js/dom/global-constructors-attributes-dedicated-worker-expected.txt (222691 => 222692)
--- trunk/LayoutTests/js/dom/global-constructors-attributes-dedicated-worker-expected.txt 2017-10-01 21:24:56 UTC (rev 222691)
+++ trunk/LayoutTests/js/dom/global-constructors-attributes-dedicated-worker-expected.txt 2017-10-01 22:32:58 UTC (rev 222692)
@@ -4,6 +4,16 @@
Starting worker: script-tests/global-constructors-attributes.js
+PASS [Worker] Object.getOwnPropertyDescriptor(global, 'AbortController').value is AbortController
+PASS [Worker] Object.getOwnPropertyDescriptor(global, 'AbortController').hasOwnProperty('get') is false
+PASS [Worker] Object.getOwnPropertyDescriptor(global, 'AbortController').hasOwnProperty('set') is false
+PASS [Worker] Object.getOwnPropertyDescriptor(global, 'AbortController').enumerable is false
+PASS [Worker] Object.getOwnPropertyDescriptor(global, 'AbortController').configurable is true
+PASS [Worker] Object.getOwnPropertyDescriptor(global, 'AbortSignal').value is AbortSignal
+PASS [Worker] Object.getOwnPropertyDescriptor(global, 'AbortSignal').hasOwnProperty('get') is false
+PASS [Worker] Object.getOwnPropertyDescriptor(global, 'AbortSignal').hasOwnProperty('set') is false
+PASS [Worker] Object.getOwnPropertyDescriptor(global, 'AbortSignal').enumerable is false
+PASS [Worker] Object.getOwnPropertyDescriptor(global, 'AbortSignal').configurable is true
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'Array').value is Array
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'Array').hasOwnProperty('get') is false
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'Array').hasOwnProperty('set') is false
Modified: trunk/Source/WebCore/CMakeLists.txt (222691 => 222692)
--- trunk/Source/WebCore/CMakeLists.txt 2017-10-01 21:24:56 UTC (rev 222691)
+++ trunk/Source/WebCore/CMakeLists.txt 2017-10-01 22:32:58 UTC (rev 222692)
@@ -490,6 +490,8 @@
css/WebKitCSSMatrix.idl
css/WebKitCSSViewportRule.idl
+ dom/AbortController.idl
+ dom/AbortSignal.idl
dom/AnimationEvent.idl
dom/Attr.idl
dom/BeforeLoadEvent.idl
@@ -1583,6 +1585,8 @@
cssjit/SelectorCompiler.cpp
+ dom/AbortController.cpp
+ dom/AbortSignal.cpp
dom/ActiveDOMCallback.cpp
dom/ActiveDOMCallbackMicrotask.cpp
dom/ActiveDOMObject.cpp
Modified: trunk/Source/WebCore/ChangeLog (222691 => 222692)
--- trunk/Source/WebCore/ChangeLog 2017-10-01 21:24:56 UTC (rev 222691)
+++ trunk/Source/WebCore/ChangeLog 2017-10-01 22:32:58 UTC (rev 222692)
@@ -1,3 +1,32 @@
+2017-10-01 Sam Weinig <[email protected]>
+
+ Add support for DOM aborting (https://dom.spec.whatwg.org/#aborting-ongoing-activities)
+ https://bugs.webkit.org/show_bug.cgi?id=177718
+
+ Reviewed by Darin Adler.
+
+ Adds standalone support for AbortController and AbortSignal. No integration
+ with other specs yet.
+
+ * CMakeLists.txt:
+ * DerivedSources.make:
+ * WebCore.xcodeproj/project.pbxproj:
+
+ Add new files.
+
+ * dom/AbortController.cpp: Added.
+ * dom/AbortController.h: Added.
+ * dom/AbortController.idl: Added.
+ * dom/AbortSignal.cpp: Added.
+ * dom/AbortSignal.h: Added.
+ * dom/AbortSignal.idl: Added.
+
+ Add basic support AbortController and AbortSignal.
+
+ * dom/EventTargetFactory.in:
+
+ Add AbortSignal to the list of EventTargets.
+
2017-10-01 Antti Koivisto <[email protected]>
Use WeakPtr for first-letter memory management
Modified: trunk/Source/WebCore/DerivedSources.make (222691 => 222692)
--- trunk/Source/WebCore/DerivedSources.make 2017-10-01 21:24:56 UTC (rev 222691)
+++ trunk/Source/WebCore/DerivedSources.make 2017-10-01 22:32:58 UTC (rev 222692)
@@ -407,7 +407,10 @@
$(WebCore)/css/StyleSheetList.idl \
$(WebCore)/css/WebKitCSSMatrix.idl \
$(WebCore)/css/WebKitCSSViewportRule.idl \
+ $(WebCore)/dom/AbortController.idl \
+ $(WebCore)/dom/AbortController.idl \
$(WebCore)/dom/AnimationEvent.idl \
+ $(WebCore)/dom/AbortSignal.idl \
$(WebCore)/dom/Attr.idl \
$(WebCore)/dom/BeforeLoadEvent.idl \
$(WebCore)/dom/BeforeUnloadEvent.idl \
Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (222691 => 222692)
--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2017-10-01 21:24:56 UTC (rev 222691)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2017-10-01 22:32:58 UTC (rev 222692)
@@ -3199,6 +3199,10 @@
7C2BDD3E17C7F98C0038FF15 /* JSDOMGlobalObjectTask.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C2BDD3C17C7F98B0038FF15 /* JSDOMGlobalObjectTask.h */; };
7C2FA6111EA95A3900A03108 /* ResourceCryptographicDigest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C2FA60F1EA95A3200A03108 /* ResourceCryptographicDigest.cpp */; };
7C2FA6121EA95A3C00A03108 /* ResourceCryptographicDigest.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C2FA6101EA95A3200A03108 /* ResourceCryptographicDigest.h */; settings = {ATTRIBUTES = (Private, ); }; };
+ 7C30D9831F815AEC00268356 /* JSAbortController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C30D97E1F815AC000268356 /* JSAbortController.cpp */; };
+ 7C30D9841F815AEC00268356 /* JSAbortController.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C30D9801F815AC100268356 /* JSAbortController.h */; };
+ 7C30D9851F815AEC00268356 /* JSAbortSignal.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C30D9821F815AC200268356 /* JSAbortSignal.cpp */; };
+ 7C30D9861F815AEC00268356 /* JSAbortSignal.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C30D9811F815AC100268356 /* JSAbortSignal.h */; };
7C330A021DF8FAC600D3395C /* GraphicsContext3DAttributes.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C330A011DF8FAC600D3395C /* GraphicsContext3DAttributes.h */; settings = {ATTRIBUTES = (Private, ); }; };
7C330A071DF9F95100D3395C /* JSPositionOptions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C330A051DF9F95100D3395C /* JSPositionOptions.cpp */; };
7C330A081DF9F95100D3395C /* JSPositionOptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C330A061DF9F95100D3395C /* JSPositionOptions.h */; };
@@ -3367,6 +3371,10 @@
7CCEBFC01DD8F6AB002C40B8 /* SVGLengthValue.h in Headers */ = {isa = PBXBuildFile; fileRef = 7CE58D531DD7B09300128552 /* SVGLengthValue.h */; settings = {ATTRIBUTES = (Private, ); }; };
7CD0BA041B8F79C9005CEBBE /* ActiveDOMCallbackMicrotask.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7CD0BA021B8F79C9005CEBBE /* ActiveDOMCallbackMicrotask.cpp */; };
7CD0BA051B8F79C9005CEBBE /* ActiveDOMCallbackMicrotask.h in Headers */ = {isa = PBXBuildFile; fileRef = 7CD0BA031B8F79C9005CEBBE /* ActiveDOMCallbackMicrotask.h */; };
+ 7CD0E2B81F80A4820016A4CE /* AbortController.h in Headers */ = {isa = PBXBuildFile; fileRef = 7CD0E2B51F80A4820016A4CE /* AbortController.h */; };
+ 7CD0E2B91F80A4820016A4CE /* AbortController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7CD0E2B61F80A4820016A4CE /* AbortController.cpp */; };
+ 7CD0E2BF1F80A56E0016A4CE /* AbortSignal.h in Headers */ = {isa = PBXBuildFile; fileRef = 7CD0E2BC1F80A56E0016A4CE /* AbortSignal.h */; };
+ 7CD0E2C01F80A56E0016A4CE /* AbortSignal.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7CD0E2BD1F80A56E0016A4CE /* AbortSignal.cpp */; };
7CD344161F3183A5000DCD49 /* JSMutationCallback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7CD344121F3108E2000DCD49 /* JSMutationCallback.cpp */; };
7CD494CC1A86EB1D000A87EC /* RenderAttachment.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7CD494CA1A86EB1D000A87EC /* RenderAttachment.cpp */; };
7CD494CD1A86EB1D000A87EC /* RenderAttachment.h in Headers */ = {isa = PBXBuildFile; fileRef = 7CD494CB1A86EB1D000A87EC /* RenderAttachment.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -11422,6 +11430,10 @@
7C2BDD3C17C7F98B0038FF15 /* JSDOMGlobalObjectTask.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDOMGlobalObjectTask.h; sourceTree = "<group>"; };
7C2FA60F1EA95A3200A03108 /* ResourceCryptographicDigest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ResourceCryptographicDigest.cpp; sourceTree = "<group>"; };
7C2FA6101EA95A3200A03108 /* ResourceCryptographicDigest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ResourceCryptographicDigest.h; sourceTree = "<group>"; };
+ 7C30D97E1F815AC000268356 /* JSAbortController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSAbortController.cpp; sourceTree = "<group>"; };
+ 7C30D9801F815AC100268356 /* JSAbortController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSAbortController.h; sourceTree = "<group>"; };
+ 7C30D9811F815AC100268356 /* JSAbortSignal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSAbortSignal.h; sourceTree = "<group>"; };
+ 7C30D9821F815AC200268356 /* JSAbortSignal.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSAbortSignal.cpp; sourceTree = "<group>"; };
7C330A011DF8FAC600D3395C /* GraphicsContext3DAttributes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GraphicsContext3DAttributes.h; sourceTree = "<group>"; };
7C330A031DF9E95B00D3395C /* PositionOptions.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = PositionOptions.idl; sourceTree = "<group>"; };
7C330A051DF9F95100D3395C /* JSPositionOptions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSPositionOptions.cpp; sourceTree = "<group>"; };
@@ -11630,6 +11642,12 @@
7CC7E3D617208C0F003C5277 /* IDNScriptWhiteList.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = IDNScriptWhiteList.txt; sourceTree = "<group>"; };
7CD0BA021B8F79C9005CEBBE /* ActiveDOMCallbackMicrotask.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ActiveDOMCallbackMicrotask.cpp; sourceTree = "<group>"; };
7CD0BA031B8F79C9005CEBBE /* ActiveDOMCallbackMicrotask.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ActiveDOMCallbackMicrotask.h; sourceTree = "<group>"; };
+ 7CD0E2B51F80A4820016A4CE /* AbortController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AbortController.h; sourceTree = "<group>"; };
+ 7CD0E2B61F80A4820016A4CE /* AbortController.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = AbortController.cpp; sourceTree = "<group>"; };
+ 7CD0E2B71F80A4820016A4CE /* AbortController.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = AbortController.idl; sourceTree = "<group>"; };
+ 7CD0E2BC1F80A56E0016A4CE /* AbortSignal.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AbortSignal.h; sourceTree = "<group>"; };
+ 7CD0E2BD1F80A56E0016A4CE /* AbortSignal.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = AbortSignal.cpp; sourceTree = "<group>"; };
+ 7CD0E2BE1F80A56E0016A4CE /* AbortSignal.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = AbortSignal.idl; sourceTree = "<group>"; };
7CD3440D1F310836000DCD49 /* MutationCallback.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = MutationCallback.idl; sourceTree = "<group>"; };
7CD344111F3108DD000DCD49 /* JSMutationCallback.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = JSMutationCallback.h; sourceTree = "<group>"; };
7CD344121F3108E2000DCD49 /* JSMutationCallback.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = JSMutationCallback.cpp; sourceTree = "<group>"; };
@@ -22644,6 +22662,10 @@
A83B79100CCB001B000B0825 /* Core */ = {
isa = PBXGroup;
children = (
+ 7C30D97E1F815AC000268356 /* JSAbortController.cpp */,
+ 7C30D9801F815AC100268356 /* JSAbortController.h */,
+ 7C30D9821F815AC200268356 /* JSAbortSignal.cpp */,
+ 7C30D9811F815AC100268356 /* JSAbortSignal.h */,
65DF31D809D1C122000BE325 /* JSAttr.cpp */,
65DF31D909D1C123000BE325 /* JSAttr.h */,
93F9B79E0BA6032600854064 /* JSCDATASection.cpp */,
@@ -26151,6 +26173,12 @@
E1C4DE6D0EA75C650023CCD6 /* ActiveDOMObject.cpp */,
E1C4DE680EA75C1E0023CCD6 /* ActiveDOMObject.h */,
83BB5C871D5D6F3A005A71F4 /* AllDescendantsCollection.h */,
+ 7CD0E2B51F80A4820016A4CE /* AbortController.h */,
+ 7CD0E2B61F80A4820016A4CE /* AbortController.cpp */,
+ 7CD0E2B71F80A4820016A4CE /* AbortController.idl */,
+ 7CD0E2BC1F80A56E0016A4CE /* AbortSignal.h */,
+ 7CD0E2BD1F80A56E0016A4CE /* AbortSignal.cpp */,
+ 7CD0E2BE1F80A56E0016A4CE /* AbortSignal.idl */,
319847FE1A1D816700A13318 /* AnimationEvent.cpp */,
319847FF1A1D816700A13318 /* AnimationEvent.h */,
319848001A1D816700A13318 /* AnimationEvent.idl */,
@@ -29359,6 +29387,7 @@
52F10866162B6DA8009AC81E /* MixedContentChecker.h in Headers */,
CDF2B0111820540600F2B424 /* MockBox.h in Headers */,
CDF4B7241E03BF8100E235A2 /* MockCDMFactory.h in Headers */,
+ 7C30D9841F815AEC00268356 /* JSAbortController.h in Headers */,
CDF4B7201E03BF6F00E235A2 /* MockCDMFactory.idl in Headers */,
51058AE01D67C229009A538C /* MockGamepad.h in Headers */,
51058AE21D67C229009A538C /* MockGamepadProvider.h in Headers */,
@@ -30252,6 +30281,7 @@
B22279950D00BF220071B782 /* SVGAnimateTransformElement.h in Headers */,
B22279980D00BF220071B782 /* SVGAnimationElement.h in Headers */,
439D334513A6911C00C20F4F /* SVGAnimatorFactory.h in Headers */,
+ 7C30D9861F815AEC00268356 /* JSAbortSignal.h in Headers */,
08FB3F8413BC754C0099FC18 /* SVGAttributeToPropertyMap.h in Headers */,
B222799C0D00BF220071B782 /* SVGCircleElement.h in Headers */,
B222799F0D00BF220071B782 /* SVGClipPathElement.h in Headers */,
@@ -30295,6 +30325,7 @@
B2227A060D00BF220071B782 /* SVGFETileElement.h in Headers */,
B2227A090D00BF220071B782 /* SVGFETurbulenceElement.h in Headers */,
845E72FC0FD2623900A87D79 /* SVGFilter.h in Headers */,
+ 7CD0E2BF1F80A56E0016A4CE /* AbortSignal.h in Headers */,
081EBF3B0FD34F4100DA7559 /* SVGFilterBuilder.h in Headers */,
B2227A0C0D00BF220071B782 /* SVGFilterElement.h in Headers */,
B2227A0F0D00BF220071B782 /* SVGFilterPrimitiveStandardAttributes.h in Headers */,
@@ -30752,6 +30783,7 @@
77A17A7812F28642004E02F6 /* WebGLVertexArrayObjectOES.h in Headers */,
316BDB8C1E6E153000DE0D5A /* WebGPULayer.h in Headers */,
A5E2123C1E4924A400CE1044 /* WebHeapAgent.h in Headers */,
+ 7CD0E2B81F80A4820016A4CE /* AbortController.h in Headers */,
A5840E25187B8AC200843B10 /* WebInjectedScriptHost.h in Headers */,
A584FE301864CB8400843B10 /* WebInjectedScriptManager.h in Headers */,
F48223111E3869B80066FC79 /* WebItemProviderPasteboard.h in Headers */,
@@ -31518,6 +31550,7 @@
CE2849891CA3614600B4A57F /* ContentSecurityPolicyDirectiveNames.cpp in Sources */,
CE799FA71C6A50570097B518 /* ContentSecurityPolicyMediaListDirective.cpp in Sources */,
CE6DADF91C591E6A003F6A88 /* ContentSecurityPolicyResponseHeaders.cpp in Sources */,
+ 7C30D9851F815AEC00268356 /* JSAbortSignal.cpp in Sources */,
CE799F9F1C6A4C160097B518 /* ContentSecurityPolicySource.cpp in Sources */,
CE799F971C6A46BC0097B518 /* ContentSecurityPolicySourceList.cpp in Sources */,
CE799FAB1C6A50660097B518 /* ContentSecurityPolicySourceListDirective.cpp in Sources */,
@@ -31589,6 +31622,7 @@
E1233F10185A4130008DFAF5 /* CryptoAlgorithmRSAES_PKCS1_v1_5Mac.cpp in Sources */,
E1BD3319182D8DDD00C05D9F /* CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp in Sources */,
E1C266D818317AB4003F8B33 /* CryptoAlgorithmRSASSA_PKCS1_v1_5Mac.cpp in Sources */,
+ 7C30D9831F815AEC00268356 /* JSAbortController.cpp in Sources */,
E125F82B1822CFEC00D84CD9 /* CryptoAlgorithmSHA1.cpp in Sources */,
E19AC3EE1824DC7900349426 /* CryptoAlgorithmSHA224.cpp in Sources */,
E19AC3F01824DC7900349426 /* CryptoAlgorithmSHA256.cpp in Sources */,
@@ -32447,6 +32481,7 @@
A584FE3B1864E2D800843B10 /* JSCommandLineAPIHost.cpp in Sources */,
93F9B6E00BA0FB7200854064 /* JSComment.cpp in Sources */,
79AC9218109945C80021266E /* JSCompositionEvent.cpp in Sources */,
+ 7CD0E2C01F80A56E0016A4CE /* AbortSignal.cpp in Sources */,
FDA15EBD12B03F0B003A583A /* JSConvolverNode.cpp in Sources */,
FE6FD48D0F676E9300092873 /* JSCoordinates.cpp in Sources */,
14DCF3B21B6BE2080062D4C2 /* JSCountQueuingStrategy.cpp in Sources */,
@@ -32539,6 +32574,7 @@
836ACED21ECAAB19004BD012 /* JSDOMMatrix.cpp in Sources */,
7CBBBCCB1F56180D005EFAAC /* JSDOMMatrix2DInit.cpp in Sources */,
835657C71ECAB10700CDE72D /* JSDOMMatrixInit.cpp in Sources */,
+ 7CD0E2B91F80A4820016A4CE /* AbortController.cpp in Sources */,
836ACED51ECAAB19004BD012 /* JSDOMMatrixReadOnly.cpp in Sources */,
A9D248060D757E7D00FDF959 /* JSDOMMimeType.cpp in Sources */,
A9D248080D757E7D00FDF959 /* JSDOMMimeTypeArray.cpp in Sources */,
Added: trunk/Source/WebCore/dom/AbortController.cpp (0 => 222692)
--- trunk/Source/WebCore/dom/AbortController.cpp (rev 0)
+++ trunk/Source/WebCore/dom/AbortController.cpp 2017-10-01 22:32:58 UTC (rev 222692)
@@ -0,0 +1,57 @@
+/*
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "AbortController.h"
+
+#include "AbortSignal.h"
+
+namespace WebCore {
+
+Ref<AbortController> AbortController::create(ScriptExecutionContext& context)
+{
+ return adoptRef(*new AbortController(context));
+}
+
+AbortController::AbortController(ScriptExecutionContext& context)
+ : m_signal(AbortSignal::create(context))
+{
+}
+
+AbortController::~AbortController()
+{
+}
+
+AbortSignal& AbortController::signal()
+{
+ return m_signal.get();
+}
+
+void AbortController::abort()
+{
+ m_signal->abort();
+}
+
+}
Added: trunk/Source/WebCore/dom/AbortController.h (0 => 222692)
--- trunk/Source/WebCore/dom/AbortController.h (rev 0)
+++ trunk/Source/WebCore/dom/AbortController.h 2017-10-01 22:32:58 UTC (rev 222692)
@@ -0,0 +1,51 @@
+/*
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include "ScriptWrappable.h"
+#include <wtf/Ref.h>
+#include <wtf/RefCounted.h>
+
+namespace WebCore {
+
+class AbortSignal;
+class ScriptExecutionContext;
+
+class AbortController : public ScriptWrappable, public RefCounted<AbortController> {
+public:
+ static Ref<AbortController> create(ScriptExecutionContext&);
+ ~AbortController();
+
+ AbortSignal& signal();
+ void abort();
+
+private:
+ explicit AbortController(ScriptExecutionContext&);
+
+ Ref<AbortSignal> m_signal;
+};
+
+}
Added: trunk/Source/WebCore/dom/AbortController.idl (0 => 222692)
--- trunk/Source/WebCore/dom/AbortController.idl (rev 0)
+++ trunk/Source/WebCore/dom/AbortController.idl 2017-10-01 22:32:58 UTC (rev 222692)
@@ -0,0 +1,35 @@
+/*
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+[
+ Constructor,
+ ConstructorCallWith=ScriptExecutionContext,
+ Exposed=(Window,Worker),
+ ImplementationLacksVTable
+] interface AbortController {
+ [SameObject] readonly attribute AbortSignal signal;
+
+ void abort();
+};
Added: trunk/Source/WebCore/dom/AbortSignal.cpp (0 => 222692)
--- trunk/Source/WebCore/dom/AbortSignal.cpp (rev 0)
+++ trunk/Source/WebCore/dom/AbortSignal.cpp 2017-10-01 22:32:58 UTC (rev 222692)
@@ -0,0 +1,64 @@
+/*
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "AbortSignal.h"
+
+#include "Event.h"
+#include "EventNames.h"
+#include "ScriptExecutionContext.h"
+
+namespace WebCore {
+
+Ref<AbortSignal> AbortSignal::create(ScriptExecutionContext& context)
+{
+ return adoptRef(*new AbortSignal(context));
+}
+
+
+AbortSignal::AbortSignal(ScriptExecutionContext& context)
+ : ContextDestructionObserver(&context)
+{
+}
+
+// https://dom.spec.whatwg.org/#abortsignal-signal-abort
+void AbortSignal::abort()
+{
+ // 1. If signal's aborted flag is set, then return.
+ if (m_aborted)
+ return;
+
+ // 2. Set signal’s aborted flag.
+ m_aborted = true;
+
+ // 3. For each algorithm in signal's abort algorithms: run algorithm.
+ // 4. Empty signal's abort algorithms.
+ // FIXME: Add support for 'abort algorithms' - https://dom.spec.whatwg.org/#abortsignal-abort-algorithms
+
+ // 5. Fire an event named abort at signal.
+ dispatchEvent(Event::create(eventNames().abortEvent, false, false));
+}
+
+}
Added: trunk/Source/WebCore/dom/AbortSignal.h (0 => 222692)
--- trunk/Source/WebCore/dom/AbortSignal.h (rev 0)
+++ trunk/Source/WebCore/dom/AbortSignal.h 2017-10-01 22:32:58 UTC (rev 222692)
@@ -0,0 +1,60 @@
+/*
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include "ContextDestructionObserver.h"
+#include "EventTarget.h"
+#include <wtf/Ref.h>
+#include <wtf/RefCounted.h>
+
+namespace WebCore {
+
+class ScriptExecutionContext;
+
+class AbortSignal final : public RefCounted<AbortSignal>, public EventTargetWithInlineData, private ContextDestructionObserver {
+public:
+ static Ref<AbortSignal> create(ScriptExecutionContext&);
+
+ void abort();
+
+ bool aborted() const { return m_aborted; }
+
+ using RefCounted::ref;
+ using RefCounted::deref;
+
+private:
+ explicit AbortSignal(ScriptExecutionContext&);
+
+ EventTargetInterface eventTargetInterface() const final { return AbortSignalEventTargetInterfaceType; }
+ ScriptExecutionContext* scriptExecutionContext() const final { return ContextDestructionObserver::scriptExecutionContext(); }
+ void refEventTarget() final { ref(); }
+ void derefEventTarget() final { deref(); }
+
+ bool m_aborted { false };
+};
+
+}
+
Added: trunk/Source/WebCore/dom/AbortSignal.idl (0 => 222692)
--- trunk/Source/WebCore/dom/AbortSignal.idl (rev 0)
+++ trunk/Source/WebCore/dom/AbortSignal.idl 2017-10-01 22:32:58 UTC (rev 222692)
@@ -0,0 +1,32 @@
+/*
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+[
+ Exposed=(Window,Worker)
+] interface AbortSignal : EventTarget {
+ readonly attribute boolean aborted;
+
+ attribute EventHandler onabort;
+};
Modified: trunk/Source/WebCore/dom/EventTargetFactory.in (222691 => 222692)
--- trunk/Source/WebCore/dom/EventTargetFactory.in 2017-10-01 21:24:56 UTC (rev 222691)
+++ trunk/Source/WebCore/dom/EventTargetFactory.in 2017-10-01 22:32:58 UTC (rev 222692)
@@ -1,5 +1,6 @@
namespace="EventTarget"
+AbortSignal
ApplePaySession conditional=APPLE_PAY
AudioNode conditional=WEB_AUDIO
AudioContext conditional=WEB_AUDIO