Diff
Modified: trunk/LayoutTests/ChangeLog (201079 => 201080)
--- trunk/LayoutTests/ChangeLog 2016-05-18 14:52:20 UTC (rev 201079)
+++ trunk/LayoutTests/ChangeLog 2016-05-18 15:22:37 UTC (rev 201080)
@@ -1,3 +1,43 @@
+2016-05-18 Youenn Fablet <youenn.fab...@crf.canon.fr>
+
+ Sync DOM exception types with WebIDL and update promise rejections
+ https://bugs.webkit.org/show_bug.cgi?id=157792
+
+ Reviewed by Eric Carlson.
+
+ * fast/dom/insertAdjacentHTML-DocumentFragment-crash-expected.txt:
+ * fast/inspector-support/uncaught-dom1-exception-expected.txt:
+ * fast/inspector-support/uncaught-dom3-exception-expected.txt:
+ * fast/inspector-support/uncaught-dom8-exception-expected.txt:
+ * fast/mediastream/MediaDevices-getUserMedia-expected.txt:
+ * fast/mediastream/MediaDevices-getUserMedia.html:
+ * fast/mediastream/delayed-permission-denied-expected.txt:
+ * fast/mediastream/delayed-permission-denied.html:
+ * fast/mediastream/error-expected.txt:
+ * fast/mediastream/error.html:
+ * fast/mediastream/getusermedia-expected.txt:
+ * fast/mediastream/mock-media-source-expected.txt:
+ * fast/regions/selection/crash-deselect-expected.txt:
+ * http/tests/media/media-stream/disconnected-frame-permission-denied-expected.txt:
+ * http/tests/media/media-stream/disconnected-frame-permission-denied.html:
+ * inspector/debugger/regress-133182-expected.txt:
+ * inspector/debugger/setPauseOnExceptions-all-expected.txt:
+ * inspector/debugger/setPauseOnExceptions-none-expected.txt:
+ * inspector/debugger/setPauseOnExceptions-uncaught-expected.txt:
+ * platform/efl/fast/dynamic/015-expected.txt:
+ * platform/gtk/fast/dynamic/015-expected.txt:
+ * platform/ios-simulator/fast/dynamic/015-expected.txt:
+ * platform/ios-simulator-wk2/editing/selection/caret-ltr-2-expected.txt:
+ * platform/ios-simulator-wk2/editing/selection/caret-ltr-2-left-expected.txt:
+ * platform/ios-simulator-wk2/editing/selection/caret-ltr-expected.txt:
+ * platform/ios-simulator-wk2/editing/selection/caret-ltr-right-expected.txt:
+ * platform/ios-simulator-wk2/editing/selection/caret-rtl-2-expected.txt:
+ * platform/ios-simulator-wk2/editing/selection/caret-rtl-2-left-expected.txt:
+ * platform/ios-simulator-wk2/editing/selection/caret-rtl-expected.txt:
+ * platform/ios-simulator-wk2/editing/selection/caret-rtl-right-expected.txt:
+ * platform/mac/fast/dynamic/015-expected.txt:
+ * platform/win/fast/dynamic/015-expected.txt:
+
2016-05-18 Joanmarie Diggs <jdi...@igalia.com>
AX: [ATK] Use WebCore Accessibility's AccessibilityText for AtkObject name and description
Modified: trunk/LayoutTests/fast/dom/insertAdjacentHTML-DocumentFragment-crash-expected.txt (201079 => 201080)
--- trunk/LayoutTests/fast/dom/insertAdjacentHTML-DocumentFragment-crash-expected.txt 2016-05-18 14:52:20 UTC (rev 201079)
+++ trunk/LayoutTests/fast/dom/insertAdjacentHTML-DocumentFragment-crash-expected.txt 2016-05-18 15:22:37 UTC (rev 201080)
@@ -1,2 +1,2 @@
-CONSOLE MESSAGE: line 9: NoModificationAllowedError: DOM Exception 7: An attempt was made to modify an object where modifications are not allowed.
+CONSOLE MESSAGE: line 9: NoModificationAllowedError: DOM Exception 7: The object can not be modified.
This test passes if it doesn't crash (or ASSERT).
Modified: trunk/LayoutTests/fast/inspector-support/uncaught-dom1-exception-expected.txt (201079 => 201080)
--- trunk/LayoutTests/fast/inspector-support/uncaught-dom1-exception-expected.txt 2016-05-18 14:52:20 UTC (rev 201079)
+++ trunk/LayoutTests/fast/inspector-support/uncaught-dom1-exception-expected.txt 2016-05-18 15:22:37 UTC (rev 201080)
@@ -1,2 +1,2 @@
-CONSOLE MESSAGE: line 13: IndexSizeError: DOM Exception 1: Index or size was negative, or greater than the allowed value.
+CONSOLE MESSAGE: line 13: IndexSizeError: DOM Exception 1: The index is not in the allowed range.
This tests that we are getting the correct message for DOM Exception 1: INDEX_SIZE_ERR.
Modified: trunk/LayoutTests/fast/inspector-support/uncaught-dom3-exception-expected.txt (201079 => 201080)
--- trunk/LayoutTests/fast/inspector-support/uncaught-dom3-exception-expected.txt 2016-05-18 14:52:20 UTC (rev 201079)
+++ trunk/LayoutTests/fast/inspector-support/uncaught-dom3-exception-expected.txt 2016-05-18 15:22:37 UTC (rev 201080)
@@ -1,2 +1,2 @@
-CONSOLE MESSAGE: line 9: HierarchyRequestError: DOM Exception 3: A Node was inserted somewhere it doesn't belong.
+CONSOLE MESSAGE: line 9: HierarchyRequestError: DOM Exception 3: The operation would yield an incorrect node tree.
This tests that we are getting the correct message for DOM Exception 3: HIERARCHY_REQUEST_ERR.
Modified: trunk/LayoutTests/fast/inspector-support/uncaught-dom8-exception-expected.txt (201079 => 201080)
--- trunk/LayoutTests/fast/inspector-support/uncaught-dom8-exception-expected.txt 2016-05-18 14:52:20 UTC (rev 201079)
+++ trunk/LayoutTests/fast/inspector-support/uncaught-dom8-exception-expected.txt 2016-05-18 15:22:37 UTC (rev 201080)
@@ -1,2 +1,2 @@
-CONSOLE MESSAGE: line 9: NotFoundError: DOM Exception 8: An attempt was made to reference a Node in a context where it does not exist.
+CONSOLE MESSAGE: line 9: NotFoundError: DOM Exception 8: The object can not be found here.
This tests that we are getting the correct message for DOM Exception 8: NOT_FOUND_ERR.
Modified: trunk/LayoutTests/fast/mediastream/MediaDevices-getUserMedia-expected.txt (201079 => 201080)
--- trunk/LayoutTests/fast/mediastream/MediaDevices-getUserMedia-expected.txt 2016-05-18 14:52:20 UTC (rev 201079)
+++ trunk/LayoutTests/fast/mediastream/MediaDevices-getUserMedia-expected.txt 2016-05-18 15:22:37 UTC (rev 201080)
@@ -24,8 +24,7 @@
PASS stream.getVideoTracks().length is 1
PASS navigator.mediaDevices.getUserMedia({audio:true}).then(invalidGotStream, error1); did not throw exception.
PASS Error callback called.
-PASS errorArg.name is "PermissionDeniedError"
-PASS errorArg.constraintName is ""
+PASS errorArg.name is "NotAllowedError"
PASS navigator.mediaDevices.getUserMedia({audio:true}).then(invalidGotStream).catch(error2); did not throw exception.
PASS Error callback called.
PASS successfullyParsed is true
Modified: trunk/LayoutTests/fast/mediastream/MediaDevices-getUserMedia.html (201079 => 201080)
--- trunk/LayoutTests/fast/mediastream/MediaDevices-getUserMedia.html 2016-05-18 14:52:20 UTC (rev 201079)
+++ trunk/LayoutTests/fast/mediastream/MediaDevices-getUserMedia.html 2016-05-18 15:22:37 UTC (rev 201080)
@@ -32,8 +32,7 @@
function error1(e) {
errorArg = e;
testPassed("Error callback called.");
- shouldBeEqualToString("errorArg.name", "PermissionDeniedError");
- shouldBeEqualToString("errorArg.constraintName", "");
+ shouldBeEqualToString("errorArg.name", "NotAllowedError");
shouldNotThrow("navigator.mediaDevices.getUserMedia({audio:true}).then(invalidGotStream).catch(error2);");
}
Modified: trunk/LayoutTests/fast/mediastream/delayed-permission-denied-expected.txt (201079 => 201080)
--- trunk/LayoutTests/fast/mediastream/delayed-permission-denied-expected.txt 2016-05-18 14:52:20 UTC (rev 201079)
+++ trunk/LayoutTests/fast/mediastream/delayed-permission-denied-expected.txt 2016-05-18 15:22:37 UTC (rev 201080)
@@ -3,7 +3,7 @@
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-PASS error.code is error.PERMISSION_DENIED
+PASS error.name is "NotAllowedError"
PASS successfullyParsed is true
TEST COMPLETE
Modified: trunk/LayoutTests/fast/mediastream/delayed-permission-denied.html (201079 => 201080)
--- trunk/LayoutTests/fast/mediastream/delayed-permission-denied.html 2016-05-18 14:52:20 UTC (rev 201079)
+++ trunk/LayoutTests/fast/mediastream/delayed-permission-denied.html 2016-05-18 15:22:37 UTC (rev 201080)
@@ -22,7 +22,7 @@
}, function(e) {
if (permissionSet) {
error = e;
- shouldBe('error.code', 'error.PERMISSION_DENIED');
+ shouldBeEqualToString('error.name', 'NotAllowedError');
finishJSTest();
return;
}
Modified: trunk/LayoutTests/fast/mediastream/error-expected.txt (201079 => 201080)
--- trunk/LayoutTests/fast/mediastream/error-expected.txt 2016-05-18 14:52:20 UTC (rev 201079)
+++ trunk/LayoutTests/fast/mediastream/error-expected.txt 2016-05-18 15:22:37 UTC (rev 201080)
@@ -3,7 +3,7 @@
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-PASS error.code is error.PERMISSION_DENIED
+PASS error.name is "NotAllowedError"
PASS successfullyParsed is true
TEST COMPLETE
Modified: trunk/LayoutTests/fast/mediastream/error.html (201079 => 201080)
--- trunk/LayoutTests/fast/mediastream/error.html 2016-05-18 14:52:20 UTC (rev 201079)
+++ trunk/LayoutTests/fast/mediastream/error.html 2016-05-18 15:22:37 UTC (rev 201080)
@@ -20,7 +20,7 @@
finishJSTest();
}, function(e) {
error = e;
- shouldBe('error.code', 'error.PERMISSION_DENIED');
+ shouldBeEqualToString('error.name', 'NotAllowedError');
finishJSTest();
});
</script>
Modified: trunk/LayoutTests/fast/mediastream/getusermedia-expected.txt (201079 => 201080)
--- trunk/LayoutTests/fast/mediastream/getusermedia-expected.txt 2016-05-18 14:52:20 UTC (rev 201079)
+++ trunk/LayoutTests/fast/mediastream/getusermedia-expected.txt 2016-05-18 15:22:37 UTC (rev 201080)
@@ -28,8 +28,8 @@
PASS navigator.webkitGetUserMedia({audio:{mandatory:{'valid_but_unsupported_1':0}, optional:[]}, video:true}, gotStreamInError, null); threw exception TypeError: Argument 3 ('errorCallback') to Navigator.webkitGetUserMedia must be a function.
PASS navigator.webkitGetUserMedia({audio:{mandatory:{'valid_but_unsupported_1':0}, optional:[]}, video:true}, gotStreamInError, error1); did not throw exception.
PASS Error callback called.
-PASS errorArg.name is "ConstraintNotSatisfiedError"
-PASS errorArg.constraintName is "valid_but_unsupported_1"
+FAIL errorArg.name should be ConstraintNotSatisfiedError. Was DataError.
+FAIL errorArg.constraintName should be valid_but_unsupported_1 (of type string). Was undefined (of type undefined).
PASS navigator.webkitGetUserMedia({audio:{mandatory:{'valid_and_supported_1':1}, optional:[{'valid_but_unsupported_1':0}]}, video:true}, gotStream5, 0); threw exception TypeError: Argument 3 ('errorCallback') to Navigator.webkitGetUserMedia must be a function.
PASS navigator.webkitGetUserMedia({audio:{mandatory:{'valid_and_supported_1':1}, optional:[{'valid_but_unsupported_1':0}]}, video:true}, gotStream5, error); did not throw exception.
PASS Stream generated.
Modified: trunk/LayoutTests/fast/mediastream/mock-media-source-expected.txt (201079 => 201080)
--- trunk/LayoutTests/fast/mediastream/mock-media-source-expected.txt 2016-05-18 14:52:20 UTC (rev 201079)
+++ trunk/LayoutTests/fast/mediastream/mock-media-source-expected.txt 2016-05-18 15:22:37 UTC (rev 201080)
@@ -10,7 +10,7 @@
*** Disable mock capture devices
internals.setMockMediaCaptureDevicesEnabled(false)
-PASS mediaDevices.getUserMedia() failed with PermissionDeniedError
+PASS mediaDevices.getUserMedia() failed with NotAllowedError
*** Enable mock capture devices
internals.setMockMediaCaptureDevicesEnabled(true)
Modified: trunk/LayoutTests/fast/regions/selection/crash-deselect-expected.txt (201079 => 201080)
--- trunk/LayoutTests/fast/regions/selection/crash-deselect-expected.txt 2016-05-18 14:52:20 UTC (rev 201079)
+++ trunk/LayoutTests/fast/regions/selection/crash-deselect-expected.txt 2016-05-18 15:22:37 UTC (rev 201080)
@@ -1,4 +1,4 @@
-CONSOLE MESSAGE: line 66: HierarchyRequestError: DOM Exception 3: A Node was inserted somewhere it doesn't belong.
+CONSOLE MESSAGE: line 66: HierarchyRequestError: DOM Exception 3: The operation would yield an incorrect node tree.
Errlog selectionTest: HierarchyRequestError: HierarchyRequestError: DOM Exception 3 : index 1
Errlog webtest_fn_24:
Modified: trunk/LayoutTests/http/tests/media/media-stream/disconnected-frame-permission-denied-expected.txt (201079 => 201080)
--- trunk/LayoutTests/http/tests/media/media-stream/disconnected-frame-permission-denied-expected.txt 2016-05-18 14:52:20 UTC (rev 201079)
+++ trunk/LayoutTests/http/tests/media/media-stream/disconnected-frame-permission-denied-expected.txt 2016-05-18 15:22:37 UTC (rev 201080)
@@ -4,7 +4,7 @@
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-PASS error.code is error.PERMISSION_DENIED
+PASS error.name is "NotAllowedError"
PASS No callbacks invoked
PASS successfullyParsed is true
Modified: trunk/LayoutTests/http/tests/media/media-stream/disconnected-frame-permission-denied.html (201079 => 201080)
--- trunk/LayoutTests/http/tests/media/media-stream/disconnected-frame-permission-denied.html 2016-05-18 14:52:20 UTC (rev 201079)
+++ trunk/LayoutTests/http/tests/media/media-stream/disconnected-frame-permission-denied.html 2016-05-18 15:22:37 UTC (rev 201080)
@@ -22,7 +22,7 @@
finishJSTest();
}, function(e) {
error = e;
- shouldBe('error.code', 'error.PERMISSION_DENIED');
+ shouldBeEqualToString('error.name', 'NotAllowedError');
debug('');
iframe.src = '';
});
Modified: trunk/LayoutTests/inspector/debugger/regress-133182-expected.txt (201079 => 201080)
--- trunk/LayoutTests/inspector/debugger/regress-133182-expected.txt 2016-05-18 14:52:20 UTC (rev 201079)
+++ trunk/LayoutTests/inspector/debugger/regress-133182-expected.txt 2016-05-18 15:22:37 UTC (rev 201080)
@@ -15,7 +15,7 @@
CONSOLE MESSAGE: line 69: [3] Resumed
CONSOLE MESSAGE: line 61: [3] Paused after stepping
CONSOLE MESSAGE: line 69: [3] Resumed
-CONSOLE MESSAGE: line 8: NotFoundError: DOM Exception 8: An attempt was made to reference a Node in a context where it does not exist.
+CONSOLE MESSAGE: line 8: NotFoundError: DOM Exception 8: The object can not be found here.
CONSOLE MESSAGE: line 56: [4] Testing statement 'exceptionInHostFunction();'
CONSOLE MESSAGE: line 57: [4] Paused and about to step
CONSOLE MESSAGE: line 69: [4] Resumed
Modified: trunk/LayoutTests/inspector/debugger/setPauseOnExceptions-all-expected.txt (201079 => 201080)
--- trunk/LayoutTests/inspector/debugger/setPauseOnExceptions-all-expected.txt 2016-05-18 14:52:20 UTC (rev 201079)
+++ trunk/LayoutTests/inspector/debugger/setPauseOnExceptions-all-expected.txt 2016-05-18 15:22:37 UTC (rev 201080)
@@ -6,7 +6,7 @@
CONSOLE MESSAGE: line 38: catchNested caught exception: {"line":1,"column":61}
CONSOLE MESSAGE: line 1: TypeError: undefined is not an object (evaluating '({}).a.b')
CONSOLE MESSAGE: line 3: TypeError: undefined is not an object (evaluating '({}).a.b')
-CONSOLE MESSAGE: line 8: NotFoundError: DOM Exception 8: An attempt was made to reference a Node in a context where it does not exist.
+CONSOLE MESSAGE: line 8: NotFoundError: DOM Exception 8: The object can not be found here.
CONSOLE MESSAGE: line 24: exception in host function
CONSOLE MESSAGE: line 13: exception string
CONSOLE MESSAGE: line 18: [object Object]
Modified: trunk/LayoutTests/inspector/debugger/setPauseOnExceptions-none-expected.txt (201079 => 201080)
--- trunk/LayoutTests/inspector/debugger/setPauseOnExceptions-none-expected.txt 2016-05-18 14:52:20 UTC (rev 201079)
+++ trunk/LayoutTests/inspector/debugger/setPauseOnExceptions-none-expected.txt 2016-05-18 15:22:37 UTC (rev 201080)
@@ -5,7 +5,7 @@
CONSOLE MESSAGE: line 38: catchNested caught exception: "exception string"
CONSOLE MESSAGE: line 38: catchNested caught exception: {"line":1,"column":61}
CONSOLE MESSAGE: line 3: TypeError: undefined is not an object (evaluating '({}).a.b')
-CONSOLE MESSAGE: line 8: NotFoundError: DOM Exception 8: An attempt was made to reference a Node in a context where it does not exist.
+CONSOLE MESSAGE: line 8: NotFoundError: DOM Exception 8: The object can not be found here.
CONSOLE MESSAGE: line 24: exception in host function
CONSOLE MESSAGE: line 13: exception string
CONSOLE MESSAGE: line 18: [object Object]
Modified: trunk/LayoutTests/inspector/debugger/setPauseOnExceptions-uncaught-expected.txt (201079 => 201080)
--- trunk/LayoutTests/inspector/debugger/setPauseOnExceptions-uncaught-expected.txt 2016-05-18 14:52:20 UTC (rev 201079)
+++ trunk/LayoutTests/inspector/debugger/setPauseOnExceptions-uncaught-expected.txt 2016-05-18 15:22:37 UTC (rev 201080)
@@ -6,7 +6,7 @@
CONSOLE MESSAGE: line 38: catchNested caught exception: {"line":1,"column":61}
CONSOLE MESSAGE: line 1: TypeError: undefined is not an object (evaluating '({}).a.b')
CONSOLE MESSAGE: line 3: TypeError: undefined is not an object (evaluating '({}).a.b')
-CONSOLE MESSAGE: line 8: NotFoundError: DOM Exception 8: An attempt was made to reference a Node in a context where it does not exist.
+CONSOLE MESSAGE: line 8: NotFoundError: DOM Exception 8: The object can not be found here.
CONSOLE MESSAGE: line 24: exception in host function
CONSOLE MESSAGE: line 13: exception string
CONSOLE MESSAGE: line 18: [object Object]
Modified: trunk/LayoutTests/platform/efl/fast/dynamic/015-expected.txt (201079 => 201080)
--- trunk/LayoutTests/platform/efl/fast/dynamic/015-expected.txt 2016-05-18 14:52:20 UTC (rev 201079)
+++ trunk/LayoutTests/platform/efl/fast/dynamic/015-expected.txt 2016-05-18 15:22:37 UTC (rev 201080)
@@ -1,4 +1,4 @@
-CONSOLE MESSAGE: line 16: IndexSizeError: DOM Exception 1: Index or size was negative, or greater than the allowed value.
+CONSOLE MESSAGE: line 16: IndexSizeError: DOM Exception 1: The index is not in the allowed range.
layer at (0,0) size 800x600
RenderView at (0,0) size 800x600
layer at (0,0) size 800x600
Modified: trunk/LayoutTests/platform/gtk/fast/dynamic/015-expected.txt (201079 => 201080)
--- trunk/LayoutTests/platform/gtk/fast/dynamic/015-expected.txt 2016-05-18 14:52:20 UTC (rev 201079)
+++ trunk/LayoutTests/platform/gtk/fast/dynamic/015-expected.txt 2016-05-18 15:22:37 UTC (rev 201080)
@@ -1,4 +1,4 @@
-CONSOLE MESSAGE: line 16: IndexSizeError: DOM Exception 1: Index or size was negative, or greater than the allowed value.
+CONSOLE MESSAGE: line 16: IndexSizeError: DOM Exception 1: The index is not in the allowed range.
layer at (0,0) size 800x600
RenderView at (0,0) size 800x600
layer at (0,0) size 800x600
Modified: trunk/LayoutTests/platform/ios-simulator/fast/dynamic/015-expected.txt (201079 => 201080)
--- trunk/LayoutTests/platform/ios-simulator/fast/dynamic/015-expected.txt 2016-05-18 14:52:20 UTC (rev 201079)
+++ trunk/LayoutTests/platform/ios-simulator/fast/dynamic/015-expected.txt 2016-05-18 15:22:37 UTC (rev 201080)
@@ -1,4 +1,4 @@
-CONSOLE MESSAGE: line 16: IndexSizeError: DOM Exception 1: Index or size was negative, or greater than the allowed value.
+CONSOLE MESSAGE: line 16: IndexSizeError: DOM Exception 1: The index is not in the allowed range.
layer at (0,0) size 800x600
RenderView at (0,0) size 800x600
layer at (0,0) size 800x600
Modified: trunk/LayoutTests/platform/ios-simulator-wk2/editing/selection/caret-ltr-2-expected.txt (201079 => 201080)
--- trunk/LayoutTests/platform/ios-simulator-wk2/editing/selection/caret-ltr-2-expected.txt 2016-05-18 14:52:20 UTC (rev 201079)
+++ trunk/LayoutTests/platform/ios-simulator-wk2/editing/selection/caret-ltr-2-expected.txt 2016-05-18 15:22:37 UTC (rev 201080)
@@ -1,4 +1,4 @@
-CONSOLE MESSAGE: line 27: IndexSizeError: DOM Exception 1: Index or size was negative, or greater than the allowed value.
+CONSOLE MESSAGE: line 27: IndexSizeError: DOM Exception 1: The index is not in the allowed range.
layer at (0,0) size 800x600
RenderView at (0,0) size 800x600
layer at (0,0) size 800x126
Modified: trunk/LayoutTests/platform/ios-simulator-wk2/editing/selection/caret-ltr-2-left-expected.txt (201079 => 201080)
--- trunk/LayoutTests/platform/ios-simulator-wk2/editing/selection/caret-ltr-2-left-expected.txt 2016-05-18 14:52:20 UTC (rev 201079)
+++ trunk/LayoutTests/platform/ios-simulator-wk2/editing/selection/caret-ltr-2-left-expected.txt 2016-05-18 15:22:37 UTC (rev 201080)
@@ -1,4 +1,4 @@
-CONSOLE MESSAGE: line 27: IndexSizeError: DOM Exception 1: Index or size was negative, or greater than the allowed value.
+CONSOLE MESSAGE: line 27: IndexSizeError: DOM Exception 1: The index is not in the allowed range.
layer at (0,0) size 800x600
RenderView at (0,0) size 800x600
layer at (0,0) size 800x126
Modified: trunk/LayoutTests/platform/ios-simulator-wk2/editing/selection/caret-ltr-expected.txt (201079 => 201080)
--- trunk/LayoutTests/platform/ios-simulator-wk2/editing/selection/caret-ltr-expected.txt 2016-05-18 14:52:20 UTC (rev 201079)
+++ trunk/LayoutTests/platform/ios-simulator-wk2/editing/selection/caret-ltr-expected.txt 2016-05-18 15:22:37 UTC (rev 201080)
@@ -1,4 +1,4 @@
-CONSOLE MESSAGE: line 27: IndexSizeError: DOM Exception 1: Index or size was negative, or greater than the allowed value.
+CONSOLE MESSAGE: line 27: IndexSizeError: DOM Exception 1: The index is not in the allowed range.
layer at (0,0) size 800x600
RenderView at (0,0) size 800x600
layer at (0,0) size 800x126
Modified: trunk/LayoutTests/platform/ios-simulator-wk2/editing/selection/caret-ltr-right-expected.txt (201079 => 201080)
--- trunk/LayoutTests/platform/ios-simulator-wk2/editing/selection/caret-ltr-right-expected.txt 2016-05-18 14:52:20 UTC (rev 201079)
+++ trunk/LayoutTests/platform/ios-simulator-wk2/editing/selection/caret-ltr-right-expected.txt 2016-05-18 15:22:37 UTC (rev 201080)
@@ -1,4 +1,4 @@
-CONSOLE MESSAGE: line 27: IndexSizeError: DOM Exception 1: Index or size was negative, or greater than the allowed value.
+CONSOLE MESSAGE: line 27: IndexSizeError: DOM Exception 1: The index is not in the allowed range.
layer at (0,0) size 800x600
RenderView at (0,0) size 800x600
layer at (0,0) size 800x126
Modified: trunk/LayoutTests/platform/ios-simulator-wk2/editing/selection/caret-rtl-2-expected.txt (201079 => 201080)
--- trunk/LayoutTests/platform/ios-simulator-wk2/editing/selection/caret-rtl-2-expected.txt 2016-05-18 14:52:20 UTC (rev 201079)
+++ trunk/LayoutTests/platform/ios-simulator-wk2/editing/selection/caret-rtl-2-expected.txt 2016-05-18 15:22:37 UTC (rev 201080)
@@ -1,4 +1,4 @@
-CONSOLE MESSAGE: line 27: IndexSizeError: DOM Exception 1: Index or size was negative, or greater than the allowed value.
+CONSOLE MESSAGE: line 27: IndexSizeError: DOM Exception 1: The index is not in the allowed range.
layer at (0,0) size 800x600
RenderView at (0,0) size 800x600
layer at (0,0) size 800x126
Modified: trunk/LayoutTests/platform/ios-simulator-wk2/editing/selection/caret-rtl-2-left-expected.txt (201079 => 201080)
--- trunk/LayoutTests/platform/ios-simulator-wk2/editing/selection/caret-rtl-2-left-expected.txt 2016-05-18 14:52:20 UTC (rev 201079)
+++ trunk/LayoutTests/platform/ios-simulator-wk2/editing/selection/caret-rtl-2-left-expected.txt 2016-05-18 15:22:37 UTC (rev 201080)
@@ -1,4 +1,4 @@
-CONSOLE MESSAGE: line 27: IndexSizeError: DOM Exception 1: Index or size was negative, or greater than the allowed value.
+CONSOLE MESSAGE: line 27: IndexSizeError: DOM Exception 1: The index is not in the allowed range.
layer at (0,0) size 800x600
RenderView at (0,0) size 800x600
layer at (0,0) size 800x126
Modified: trunk/LayoutTests/platform/ios-simulator-wk2/editing/selection/caret-rtl-expected.txt (201079 => 201080)
--- trunk/LayoutTests/platform/ios-simulator-wk2/editing/selection/caret-rtl-expected.txt 2016-05-18 14:52:20 UTC (rev 201079)
+++ trunk/LayoutTests/platform/ios-simulator-wk2/editing/selection/caret-rtl-expected.txt 2016-05-18 15:22:37 UTC (rev 201080)
@@ -1,4 +1,4 @@
-CONSOLE MESSAGE: line 27: IndexSizeError: DOM Exception 1: Index or size was negative, or greater than the allowed value.
+CONSOLE MESSAGE: line 27: IndexSizeError: DOM Exception 1: The index is not in the allowed range.
layer at (0,0) size 800x600
RenderView at (0,0) size 800x600
layer at (0,0) size 800x126
Modified: trunk/LayoutTests/platform/ios-simulator-wk2/editing/selection/caret-rtl-right-expected.txt (201079 => 201080)
--- trunk/LayoutTests/platform/ios-simulator-wk2/editing/selection/caret-rtl-right-expected.txt 2016-05-18 14:52:20 UTC (rev 201079)
+++ trunk/LayoutTests/platform/ios-simulator-wk2/editing/selection/caret-rtl-right-expected.txt 2016-05-18 15:22:37 UTC (rev 201080)
@@ -1,4 +1,4 @@
-CONSOLE MESSAGE: line 27: IndexSizeError: DOM Exception 1: Index or size was negative, or greater than the allowed value.
+CONSOLE MESSAGE: line 27: IndexSizeError: DOM Exception 1: The index is not in the allowed range.
layer at (0,0) size 800x600
RenderView at (0,0) size 800x600
layer at (0,0) size 800x126
Modified: trunk/LayoutTests/platform/mac/fast/dynamic/015-expected.txt (201079 => 201080)
--- trunk/LayoutTests/platform/mac/fast/dynamic/015-expected.txt 2016-05-18 14:52:20 UTC (rev 201079)
+++ trunk/LayoutTests/platform/mac/fast/dynamic/015-expected.txt 2016-05-18 15:22:37 UTC (rev 201080)
@@ -1,4 +1,4 @@
-CONSOLE MESSAGE: line 16: IndexSizeError: DOM Exception 1: Index or size was negative, or greater than the allowed value.
+CONSOLE MESSAGE: line 16: IndexSizeError: DOM Exception 1: The index is not in the allowed range.
layer at (0,0) size 800x600
RenderView at (0,0) size 800x600
layer at (0,0) size 800x600
Modified: trunk/LayoutTests/platform/win/fast/dynamic/015-expected.txt (201079 => 201080)
--- trunk/LayoutTests/platform/win/fast/dynamic/015-expected.txt 2016-05-18 14:52:20 UTC (rev 201079)
+++ trunk/LayoutTests/platform/win/fast/dynamic/015-expected.txt 2016-05-18 15:22:37 UTC (rev 201080)
@@ -1,4 +1,4 @@
-CONSOLE MESSAGE: line 16: IndexSizeError: DOM Exception 1: Index or size was negative, or greater than the allowed value.
+CONSOLE MESSAGE: line 16: IndexSizeError: DOM Exception 1: The index is not in the allowed range.
layer at (0,0) size 800x600
RenderView at (0,0) size 800x600
layer at (0,0) size 800x600
Modified: trunk/Source/WebCore/CMakeLists.txt (201079 => 201080)
--- trunk/Source/WebCore/CMakeLists.txt 2016-05-18 14:52:20 UTC (rev 201079)
+++ trunk/Source/WebCore/CMakeLists.txt 2016-05-18 15:22:37 UTC (rev 201080)
@@ -224,7 +224,6 @@
Modules/mediastream/MediaTrackSupportedConstraints.idl
Modules/mediastream/NavigatorMediaDevices.idl
Modules/mediastream/NavigatorUserMedia.idl
- Modules/mediastream/NavigatorUserMediaError.idl
Modules/mediastream/RTCConfiguration.idl
Modules/mediastream/RTCDTMFSender.idl
Modules/mediastream/RTCDTMFToneChangeEvent.idl
@@ -922,7 +921,6 @@
Modules/mediastream/MediaTrackConstraintSet.cpp
Modules/mediastream/MediaTrackConstraints.cpp
Modules/mediastream/NavigatorMediaDevices.cpp
- Modules/mediastream/NavigatorUserMediaError.cpp
Modules/mediastream/RTCConfiguration.cpp
Modules/mediastream/RTCDTMFSender.cpp
Modules/mediastream/RTCDTMFToneChangeEvent.cpp
Modified: trunk/Source/WebCore/ChangeLog (201079 => 201080)
--- trunk/Source/WebCore/ChangeLog 2016-05-18 14:52:20 UTC (rev 201079)
+++ trunk/Source/WebCore/ChangeLog 2016-05-18 15:22:37 UTC (rev 201080)
@@ -1,3 +1,59 @@
+2016-05-18 Youenn Fablet <youenn.fab...@crf.canon.fr>
+
+ Sync DOM exception types with WebIDL and update promise rejections
+ https://bugs.webkit.org/show_bug.cgi?id=157792
+
+ Reviewed by Eric Carlson.
+
+ Updating ExceptionCode with WebIDL latest exception types.
+ Updating promise rejection code to use those types as per the latest specifications.
+
+ Updating getUserMedia error handling by removing NavigatorUserMediaError which no long exists.
+
+ Covered by rebased tests.
+
+ * CMakeLists.txt:
+ * DerivedSources.cpp:
+ * DerivedSources.make:
+ * Modules/mediastream/MediaDevices.h:
+ * Modules/mediastream/MediaEndpointPeerConnection.cpp:
+ (WebCore::MediaEndpointPeerConnection::createAnswer):
+ (WebCore::MediaEndpointPeerConnection::setLocalDescription):
+ (WebCore::MediaEndpointPeerConnection::setRemoteDescription):
+ (WebCore::MediaEndpointPeerConnection::addIceCandidate):
+ (WebCore::MediaEndpointPeerConnection::getStats):
+ (WebCore::MediaEndpointPeerConnection::replaceTrack):
+ * Modules/mediastream/NavigatorUserMediaError.cpp: Removed.
+ * Modules/mediastream/NavigatorUserMediaError.h: Removed.
+ * Modules/mediastream/NavigatorUserMediaError.idl: Removed.
+ * Modules/mediastream/RTCPeerConnection.cpp:
+ (WebCore::RTCPeerConnection::queuedCreateOffer):
+ (WebCore::RTCPeerConnection::queuedCreateAnswer):
+ (WebCore::RTCPeerConnection::queuedSetLocalDescription):
+ (WebCore::RTCPeerConnection::queuedSetRemoteDescription):
+ (WebCore::RTCPeerConnection::queuedAddIceCandidate):
+ * Modules/mediastream/RTCRtpSender.cpp:
+ (WebCore::RTCRtpSender::replaceTrack):
+ * Modules/mediastream/UserMediaRequest.cpp:
+ (WebCore::UserMediaRequest::failedToCreateStreamWithConstraintsError):
+ (WebCore::UserMediaRequest::failedToCreateStreamWithPermissionError):
+ * WebCore.xcodeproj/project.pbxproj:
+ * bindings/js/JSDOMBinding.cpp:
+ (WebCore::createDOMException):
+ * bindings/js/JSDOMBinding.h:
+ * bindings/js/JSDOMPromise.cpp:
+ (WebCore::DeferredWrapper::reject):
+ * bindings/js/JSDOMPromise.h:
+ (WebCore::DeferredWrapper::reject):
+ (WebCore::DOMPromise::reject):
+ * css/FontFaceSet.cpp:
+ (WebCore::FontFaceSet::load):
+ (WebCore::FontFaceSet::faceFinished):
+ * dom/DOMCoreException.cpp:
+ * dom/ExceptionCode.h:
+ * html/HTMLMediaElement.cpp:
+ (WebCore::HTMLMediaElement::play):
+
2016-05-18 Philippe Normand <pnorm...@igalia.com>
[GStreamer] webaudio crash on ARM platforms
Modified: trunk/Source/WebCore/DerivedSources.cpp (201079 => 201080)
--- trunk/Source/WebCore/DerivedSources.cpp 2016-05-18 14:52:20 UTC (rev 201079)
+++ trunk/Source/WebCore/DerivedSources.cpp 2016-05-18 15:22:37 UTC (rev 201080)
@@ -361,7 +361,6 @@
#include "JSNavigatorGeolocation.cpp"
#include "JSNavigatorMediaDevices.cpp"
#include "JSNavigatorUserMedia.cpp"
-#include "JSNavigatorUserMediaError.cpp"
#include "JSNavigatorVibration.cpp"
#include "JSNode.cpp"
#include "JSNodeFilter.cpp"
Modified: trunk/Source/WebCore/DerivedSources.make (201079 => 201080)
--- trunk/Source/WebCore/DerivedSources.make 2016-05-18 14:52:20 UTC (rev 201079)
+++ trunk/Source/WebCore/DerivedSources.make 2016-05-18 15:22:37 UTC (rev 201080)
@@ -140,7 +140,6 @@
$(WebCore)/Modules/mediastream/MediaTrackSupportedConstraints.idl \
$(WebCore)/Modules/mediastream/NavigatorMediaDevices.idl \
$(WebCore)/Modules/mediastream/NavigatorUserMedia.idl \
- $(WebCore)/Modules/mediastream/NavigatorUserMediaError.idl \
$(WebCore)/Modules/mediastream/RTCConfiguration.idl \
$(WebCore)/Modules/mediastream/RTCDTMFSender.idl \
$(WebCore)/Modules/mediastream/RTCDTMFToneChangeEvent.idl \
Modified: trunk/Source/WebCore/Modules/mediastream/MediaDevices.h (201079 => 201080)
--- trunk/Source/WebCore/Modules/mediastream/MediaDevices.h 2016-05-18 14:52:20 UTC (rev 201079)
+++ trunk/Source/WebCore/Modules/mediastream/MediaDevices.h 2016-05-18 15:22:37 UTC (rev 201080)
@@ -47,7 +47,6 @@
class Document;
class MediaStream;
class MediaTrackSupportedConstraints;
-class NavigatorUserMediaError;
typedef int ExceptionCode;
Modified: trunk/Source/WebCore/Modules/mediastream/MediaEndpointPeerConnection.cpp (201079 => 201080)
--- trunk/Source/WebCore/Modules/mediastream/MediaEndpointPeerConnection.cpp 2016-05-18 14:52:20 UTC (rev 201079)
+++ trunk/Source/WebCore/Modules/mediastream/MediaEndpointPeerConnection.cpp 2016-05-18 15:22:37 UTC (rev 201080)
@@ -33,8 +33,6 @@
#if ENABLE(WEB_RTC)
#include "MediaEndpointPeerConnection.h"
-#include "DOMError.h"
-#include "JSDOMError.h"
#include "JSRTCSessionDescription.h"
#include "MediaEndpointSessionConfiguration.h"
#include "MediaStreamTrack.h"
@@ -171,7 +169,7 @@
notImplemented();
- promise.reject(DOMError::create("NotSupportedError"));
+ promise.reject(NOT_SUPPORTED_ERR);
}
void MediaEndpointPeerConnection::setLocalDescription(RTCSessionDescription& description, VoidPromise&& promise)
@@ -180,7 +178,7 @@
notImplemented();
- promise.reject(DOMError::create("NotSupportedError"));
+ promise.reject(NOT_SUPPORTED_ERR);
}
RefPtr<RTCSessionDescription> MediaEndpointPeerConnection::localDescription() const
@@ -210,7 +208,7 @@
notImplemented();
- promise.reject(DOMError::create("NotSupportedError"));
+ promise.reject(NOT_SUPPORTED_ERR);
}
RefPtr<RTCSessionDescription> MediaEndpointPeerConnection::remoteDescription() const
@@ -247,14 +245,14 @@
notImplemented();
- promise.reject(DOMError::create("NotSupportedError"));
+ promise.reject(NOT_SUPPORTED_ERR);
}
void MediaEndpointPeerConnection::getStats(MediaStreamTrack*, PeerConnection::StatsPromise&& promise)
{
notImplemented();
- promise.reject(DOMError::create("NotSupportedError"));
+ promise.reject(NOT_SUPPORTED_ERR);
}
void MediaEndpointPeerConnection::replaceTrack(RTCRtpSender& sender, MediaStreamTrack& withTrack, PeerConnection::VoidPromise&& promise)
@@ -265,7 +263,7 @@
notImplemented();
- promise.reject(DOMError::create("NotSupportedError"));
+ promise.reject(NOT_SUPPORTED_ERR);
}
void MediaEndpointPeerConnection::stop()
Deleted: trunk/Source/WebCore/Modules/mediastream/NavigatorUserMediaError.cpp (201079 => 201080)
--- trunk/Source/WebCore/Modules/mediastream/NavigatorUserMediaError.cpp 2016-05-18 14:52:20 UTC (rev 201079)
+++ trunk/Source/WebCore/Modules/mediastream/NavigatorUserMediaError.cpp 2016-05-18 15:22:37 UTC (rev 201080)
@@ -1,51 +0,0 @@
-/*
- * Copyright (C) 2013 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. ``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
- * 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"
-
-#if ENABLE(MEDIA_STREAM)
-
-#include "NavigatorUserMediaError.h"
-
-#include <wtf/NeverDestroyed.h>
-
-namespace WebCore {
-
-const AtomicString& NavigatorUserMediaError::permissionDeniedErrorName()
-{
- static NeverDestroyed<AtomicString> permissionDenied("PermissionDeniedError", AtomicString::ConstructFromLiteral);
- return permissionDenied;
-}
-
-const AtomicString& NavigatorUserMediaError::constraintNotSatisfiedErrorName()
-{
- static NeverDestroyed<AtomicString> constraintNotSatisfied("ConstraintNotSatisfiedError", AtomicString::ConstructFromLiteral);
- return constraintNotSatisfied;
-}
-
-} // namespace WebCore
-
-#endif // ENABLE(MEDIA_STREAM)
-
Deleted: trunk/Source/WebCore/Modules/mediastream/NavigatorUserMediaError.h (201079 => 201080)
--- trunk/Source/WebCore/Modules/mediastream/NavigatorUserMediaError.h 2016-05-18 14:52:20 UTC (rev 201079)
+++ trunk/Source/WebCore/Modules/mediastream/NavigatorUserMediaError.h 2016-05-18 15:22:37 UTC (rev 201080)
@@ -1,65 +0,0 @@
-/*
- * Copyright (C) 2011 Google Inc. All rights reserved.
- * Copyright (C) 2013 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.
- */
-
-#ifndef NavigatorUserMediaError_h
-#define NavigatorUserMediaError_h
-
-#include "DOMError.h"
-#include <wtf/PassRefPtr.h>
-#include <wtf/RefCounted.h>
-
-#if ENABLE(MEDIA_STREAM)
-
-namespace WebCore {
-
-class NavigatorUserMediaError : public DOMError {
-public:
- static Ref<NavigatorUserMediaError> create(const String& name, const String& constraintName)
- {
- return adoptRef(*new NavigatorUserMediaError(name, constraintName));
- }
-
- virtual ~NavigatorUserMediaError() { }
-
- const String& constraintName() const { return m_constraintName; }
-
- static const AtomicString& permissionDeniedErrorName();
- static const AtomicString& constraintNotSatisfiedErrorName();
-
-private:
- NavigatorUserMediaError(const String& name, const String& constraintName)
- : DOMError(name, { })
- , m_constraintName(constraintName)
- {
- }
-
- String m_constraintName;
-};
-
-} // namespace WebCore
-
-#endif // ENABLE(MEDIA_STREAM)
-
-#endif // NavigatorUserMediaError_h
Deleted: trunk/Source/WebCore/Modules/mediastream/NavigatorUserMediaError.idl (201079 => 201080)
--- trunk/Source/WebCore/Modules/mediastream/NavigatorUserMediaError.idl 2016-05-18 14:52:20 UTC (rev 201079)
+++ trunk/Source/WebCore/Modules/mediastream/NavigatorUserMediaError.idl 2016-05-18 15:22:37 UTC (rev 201080)
@@ -1,33 +0,0 @@
-/*
- * Copyright (C) 2011 Google Inc. All rights reserved.
- * Copyright (C) 2013 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.
- */
-
-[
- NoInterfaceObject,
- Conditional=MEDIA_STREAM,
- JSGenerateToJSObject,
-] interface NavigatorUserMediaError : DOMError {
- readonly attribute DOMString constraintName;
-};
-
Modified: trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp (201079 => 201080)
--- trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp 2016-05-18 14:52:20 UTC (rev 201079)
+++ trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp 2016-05-18 15:22:37 UTC (rev 201080)
@@ -36,12 +36,10 @@
#include "RTCPeerConnection.h"
-#include "DOMError.h"
#include "Document.h"
#include "Event.h"
#include "ExceptionCode.h"
#include "Frame.h"
-#include "JSDOMError.h"
#include "MediaStream.h"
#include "MediaStreamTrack.h"
#include "RTCConfiguration.h"
@@ -152,14 +150,14 @@
void RTCPeerConnection::queuedCreateOffer(const Dictionary& offerOptions, SessionDescriptionPromise&& promise)
{
if (m_signalingState == SignalingState::Closed) {
- promise.reject(DOMError::create("InvalidStateError"));
+ promise.reject(INVALID_STATE_ERR);
return;
}
ExceptionCode ec = 0;
RefPtr<RTCOfferOptions> options = RTCOfferOptions::create(offerOptions, ec);
if (ec) {
- promise.reject(DOMError::create("Invalid createOffer argument"));
+ promise.reject(OperationError, "Invalid createOffer argument");
return;
}
ASSERT(options);
@@ -170,14 +168,14 @@
void RTCPeerConnection::queuedCreateAnswer(const Dictionary& answerOptions, SessionDescriptionPromise&& promise)
{
if (m_signalingState == SignalingState::Closed) {
- promise.reject(DOMError::create("InvalidStateError"));
+ promise.reject(INVALID_STATE_ERR);
return;
}
ExceptionCode ec = 0;
RefPtr<RTCAnswerOptions> options = RTCAnswerOptions::create(answerOptions, ec);
if (ec) {
- promise.reject(DOMError::create("Invalid createAnswer argument"));
+ promise.reject(OperationError, "Invalid createAnswer argument");
return;
}
@@ -187,7 +185,7 @@
void RTCPeerConnection::queuedSetLocalDescription(RTCSessionDescription& description, PeerConnection::VoidPromise&& promise)
{
if (m_signalingState == SignalingState::Closed) {
- promise.reject(DOMError::create("InvalidStateError"));
+ promise.reject(INVALID_STATE_ERR);
return;
}
@@ -212,7 +210,7 @@
void RTCPeerConnection::queuedSetRemoteDescription(RTCSessionDescription& description, PeerConnection::VoidPromise&& promise)
{
if (m_signalingState == SignalingState::Closed) {
- promise.reject(DOMError::create("InvalidStateError"));
+ promise.reject(INVALID_STATE_ERR);
return;
}
@@ -237,7 +235,7 @@
void RTCPeerConnection::queuedAddIceCandidate(RTCIceCandidate& rtcCandidate, VoidPromise&& promise)
{
if (m_signalingState == SignalingState::Closed) {
- promise.reject(DOMError::create("InvalidStateError"));
+ promise.reject(INVALID_STATE_ERR);
return;
}
Modified: trunk/Source/WebCore/Modules/mediastream/RTCRtpSender.cpp (201079 => 201080)
--- trunk/Source/WebCore/Modules/mediastream/RTCRtpSender.cpp 2016-05-18 14:52:20 UTC (rev 201079)
+++ trunk/Source/WebCore/Modules/mediastream/RTCRtpSender.cpp 2016-05-18 15:22:37 UTC (rev 201080)
@@ -33,9 +33,7 @@
#if ENABLE(WEB_RTC)
-#include "DOMError.h"
#include "ExceptionCode.h"
-#include "JSDOMError.h"
namespace WebCore {
@@ -51,7 +49,7 @@
void RTCRtpSender::replaceTrack(MediaStreamTrack& withTrack, PeerConnection::VoidPromise&& promise, ExceptionCode& ec)
{
if (!m_client) {
- promise.reject(DOMError::create("InvalidStateError"));
+ promise.reject(INVALID_STATE_ERR);
return;
}
Modified: trunk/Source/WebCore/Modules/mediastream/UserMediaRequest.cpp (201079 => 201080)
--- trunk/Source/WebCore/Modules/mediastream/UserMediaRequest.cpp 2016-05-18 14:52:20 UTC (rev 201079)
+++ trunk/Source/WebCore/Modules/mediastream/UserMediaRequest.cpp 2016-05-18 15:22:37 UTC (rev 201080)
@@ -43,7 +43,6 @@
#include "Frame.h"
#include "JSMediaDeviceInfo.h"
#include "JSMediaStream.h"
-#include "JSNavigatorUserMediaError.h"
#include "MainFrame.h"
#include "MediaConstraintsImpl.h"
#include "MediaStream.h"
@@ -191,11 +190,13 @@
void UserMediaRequest::failedToCreateStreamWithConstraintsError(const String& constraintName)
{
+ UNUSED_PARAM(constraintName);
ASSERT(!constraintName.isEmpty());
if (!m_scriptExecutionContext)
return;
- m_promise.reject(NavigatorUserMediaError::create(NavigatorUserMediaError::constraintNotSatisfiedErrorName(), constraintName));
+ // FIXME: The promise should be rejected with an OverconstrainedError, https://bugs.webkit.org/show_bug.cgi?id=157839.
+ m_promise.reject(DataError);
}
void UserMediaRequest::failedToCreateStreamWithPermissionError()
@@ -203,8 +204,7 @@
if (!m_scriptExecutionContext)
return;
- // FIXME: Replace NavigatorUserMediaError with MediaStreamError (see bug 143335)
- m_promise.reject(NavigatorUserMediaError::create(NavigatorUserMediaError::permissionDeniedErrorName(), emptyString()));
+ m_promise.reject(NotAllowedError);
}
void UserMediaRequest::contextDestroyed()
Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (201079 => 201080)
--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2016-05-18 14:52:20 UTC (rev 201079)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2016-05-18 15:22:37 UTC (rev 201080)
@@ -66,7 +66,6 @@
066C77310AB603FD00238CC4 /* RenderFileUploadControl.h in Headers */ = {isa = PBXBuildFile; fileRef = 066C772F0AB603FD00238CC4 /* RenderFileUploadControl.h */; };
06E81ED70AB5D5E900C87837 /* LocalCurrentGraphicsContext.h in Headers */ = {isa = PBXBuildFile; fileRef = 06E81ED60AB5D5E900C87837 /* LocalCurrentGraphicsContext.h */; };
06E81EEC0AB5DA9700C87837 /* LocalCurrentGraphicsContext.mm in Sources */ = {isa = PBXBuildFile; fileRef = 06E81EEB0AB5DA9700C87837 /* LocalCurrentGraphicsContext.mm */; };
- 070327F817EA4AAF00CE1318 /* NavigatorUserMediaError.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 070327F717EA4AAF00CE1318 /* NavigatorUserMediaError.cpp */; };
070334D31459FFAD008D8D45 /* TrackEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 070334D01459FFAC008D8D45 /* TrackEvent.cpp */; };
070334D71459FFD5008D8D45 /* TrackBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 070334D61459FFD5008D8D45 /* TrackBase.h */; settings = {ATTRIBUTES = (Private, ); }; };
070334D9145A006F008D8D45 /* TrackBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 070334D8145A006F008D8D45 /* TrackBase.cpp */; };
@@ -159,8 +158,6 @@
07394ECA1BAB2CD700BE99CD /* MediaDevicesRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = 07394EC91BAB2CD700BE99CD /* MediaDevicesRequest.h */; settings = {ATTRIBUTES = (Private, ); }; };
073BE34017D17E01002BD431 /* JSNavigatorUserMedia.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 073BE33E17D17E01002BD431 /* JSNavigatorUserMedia.cpp */; };
073BE34117D17E01002BD431 /* JSNavigatorUserMedia.h in Headers */ = {isa = PBXBuildFile; fileRef = 073BE33F17D17E01002BD431 /* JSNavigatorUserMedia.h */; settings = {ATTRIBUTES = (Private, ); }; };
- 073BE34817D17E7A002BD431 /* JSNavigatorUserMediaError.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 073BE34217D17E7A002BD431 /* JSNavigatorUserMediaError.cpp */; };
- 073BE34917D17E7A002BD431 /* JSNavigatorUserMediaError.h in Headers */ = {isa = PBXBuildFile; fileRef = 073BE34317D17E7A002BD431 /* JSNavigatorUserMediaError.h */; };
073BE34E17D180B2002BD431 /* RTCSessionDescriptionDescriptor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07221BAB17CF0AD400848E51 /* RTCSessionDescriptionDescriptor.cpp */; };
073BE34F17D18183002BD431 /* RTCIceCandidateDescriptor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07221BA617CF0AD400848E51 /* RTCIceCandidateDescriptor.cpp */; };
073BE35017D181A6002BD431 /* RTCPeerConnectionHandler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07221BA817CF0AD400848E51 /* RTCPeerConnectionHandler.cpp */; };
@@ -224,7 +221,6 @@
078E091717D14D1C00420AA1 /* MediaStreamRegistry.h in Headers */ = {isa = PBXBuildFile; fileRef = 07221B5317CEC32700848E51 /* MediaStreamRegistry.h */; settings = {ATTRIBUTES = (Private, ); }; };
078E091817D14D1C00420AA1 /* MediaStreamTrack.h in Headers */ = {isa = PBXBuildFile; fileRef = 07221B5517CEC32700848E51 /* MediaStreamTrack.h */; };
078E091917D14D1C00420AA1 /* MediaStreamTrackEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 07221B5817CEC32700848E51 /* MediaStreamTrackEvent.h */; settings = {ATTRIBUTES = (Private, ); }; };
- 078E091B17D14D1C00420AA1 /* NavigatorUserMediaError.h in Headers */ = {isa = PBXBuildFile; fileRef = 07221B5D17CEC32700848E51 /* NavigatorUserMediaError.h */; settings = {ATTRIBUTES = (Private, ); }; };
078E091E17D14D1C00420AA1 /* RTCDataChannel.h in Headers */ = {isa = PBXBuildFile; fileRef = 07221B6417CEC32700848E51 /* RTCDataChannel.h */; settings = {ATTRIBUTES = (Private, ); }; };
078E091F17D14D1C00420AA1 /* RTCDataChannelEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 07221B6717CEC32700848E51 /* RTCDataChannelEvent.h */; settings = {ATTRIBUTES = (Private, ); }; };
078E092017D14D1C00420AA1 /* RTCDTMFSender.h in Headers */ = {isa = PBXBuildFile; fileRef = 07221B6A17CEC32700848E51 /* RTCDTMFSender.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -7436,7 +7432,6 @@
066C772F0AB603FD00238CC4 /* RenderFileUploadControl.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = RenderFileUploadControl.h; sourceTree = "<group>"; };
06E81ED60AB5D5E900C87837 /* LocalCurrentGraphicsContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LocalCurrentGraphicsContext.h; sourceTree = "<group>"; };
06E81EEB0AB5DA9700C87837 /* LocalCurrentGraphicsContext.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = LocalCurrentGraphicsContext.mm; sourceTree = "<group>"; };
- 070327F717EA4AAF00CE1318 /* NavigatorUserMediaError.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NavigatorUserMediaError.cpp; sourceTree = "<group>"; };
070334D01459FFAC008D8D45 /* TrackEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TrackEvent.cpp; sourceTree = "<group>"; };
070334D11459FFAC008D8D45 /* TrackEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TrackEvent.h; sourceTree = "<group>"; };
070334D21459FFAC008D8D45 /* TrackEvent.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = TrackEvent.idl; sourceTree = "<group>"; };
@@ -7513,8 +7508,6 @@
07221B5817CEC32700848E51 /* MediaStreamTrackEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaStreamTrackEvent.h; sourceTree = "<group>"; };
07221B5917CEC32700848E51 /* MediaStreamTrackEvent.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = MediaStreamTrackEvent.idl; sourceTree = "<group>"; };
07221B5C17CEC32700848E51 /* NavigatorUserMedia.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = NavigatorUserMedia.idl; sourceTree = "<group>"; };
- 07221B5D17CEC32700848E51 /* NavigatorUserMediaError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NavigatorUserMediaError.h; sourceTree = "<group>"; };
- 07221B5E17CEC32700848E51 /* NavigatorUserMediaError.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = NavigatorUserMediaError.idl; sourceTree = "<group>"; };
07221B6317CEC32700848E51 /* RTCDataChannel.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RTCDataChannel.cpp; sourceTree = "<group>"; };
07221B6417CEC32700848E51 /* RTCDataChannel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RTCDataChannel.h; sourceTree = "<group>"; };
07221B6517CEC32700848E51 /* RTCDataChannel.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = RTCDataChannel.idl; sourceTree = "<group>"; };
@@ -7612,8 +7605,6 @@
07394EC91BAB2CD700BE99CD /* MediaDevicesRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaDevicesRequest.h; sourceTree = "<group>"; };
073BE33E17D17E01002BD431 /* JSNavigatorUserMedia.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSNavigatorUserMedia.cpp; sourceTree = "<group>"; };
073BE33F17D17E01002BD431 /* JSNavigatorUserMedia.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSNavigatorUserMedia.h; sourceTree = "<group>"; };
- 073BE34217D17E7A002BD431 /* JSNavigatorUserMediaError.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSNavigatorUserMediaError.cpp; sourceTree = "<group>"; };
- 073BE34317D17E7A002BD431 /* JSNavigatorUserMediaError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSNavigatorUserMediaError.h; sourceTree = "<group>"; };
074E82B818A69F0E007EF54C /* PlatformTimeRanges.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PlatformTimeRanges.cpp; sourceTree = "<group>"; };
074E82B918A69F0E007EF54C /* PlatformTimeRanges.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlatformTimeRanges.h; sourceTree = "<group>"; };
0753860014489E9800B78452 /* CachedTextTrack.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CachedTextTrack.cpp; sourceTree = "<group>"; };
@@ -15448,9 +15439,6 @@
5EA725CC1ACABCB500EAD17B /* NavigatorMediaDevices.idl */,
07221B5C17CEC32700848E51 /* NavigatorUserMedia.idl */,
419BE75A1BCBD3ED00E1C85B /* NavigatorUserMedia.js */,
- 070327F717EA4AAF00CE1318 /* NavigatorUserMediaError.cpp */,
- 07221B5D17CEC32700848E51 /* NavigatorUserMediaError.h */,
- 07221B5E17CEC32700848E51 /* NavigatorUserMediaError.idl */,
5E2C434D1BCEE2E50001E2BC /* PeerConnectionBackend.h */,
5E2C434E1BCEE2E50001E2BC /* PeerConnectionStates.h */,
5E2C434F1BCEE2E50001E2BC /* RTCConfiguration.cpp */,
@@ -15667,8 +15655,6 @@
0787C4681BFBDF6F006DCD7F /* JSMediaTrackSupportedConstraints.h */,
073BE33E17D17E01002BD431 /* JSNavigatorUserMedia.cpp */,
073BE33F17D17E01002BD431 /* JSNavigatorUserMedia.h */,
- 073BE34217D17E7A002BD431 /* JSNavigatorUserMediaError.cpp */,
- 073BE34317D17E7A002BD431 /* JSNavigatorUserMediaError.h */,
073794E319EE2FF200E5A045 /* JSRTCConfiguration.cpp */,
073794E419EE2FF200E5A045 /* JSRTCConfiguration.h */,
07969D9117D14151007FF842 /* JSRTCDataChannel.cpp */,
@@ -26784,7 +26770,6 @@
BCD9C2C10C17B69E005C90A2 /* JSNamedNodeMap.h in Headers */,
A9D247F80D757E3400FDF959 /* JSNavigator.h in Headers */,
073BE34117D17E01002BD431 /* JSNavigatorUserMedia.h in Headers */,
- 073BE34917D17E7A002BD431 /* JSNavigatorUserMediaError.h in Headers */,
BC9439C3116CF4940048C750 /* JSNodeCustom.h in Headers */,
14115B7309F84CD600CA4FC1 /* JSNodeFilter.h in Headers */,
1A750D8E0A90E521000FF215 /* JSNodeIterator.h in Headers */,
@@ -27332,7 +27317,6 @@
E12719C70EEEC16800F61213 /* NavigatorBase.h in Headers */,
9711460414EF009A00674FD9 /* NavigatorGeolocation.h in Headers */,
5EA725D61ACABD5700EAD17B /* NavigatorMediaDevices.h in Headers */,
- 078E091B17D14D1C00420AA1 /* NavigatorUserMediaError.h in Headers */,
A19D93461A9FEC7200B46C24 /* NEFilterSourceSPI.h in Headers */,
8A309C9F123950BE00CB9204 /* NestingLevelIncrementer.h in Headers */,
656D37430ADBA5DE00A4554D /* NetscapePlugInStreamLoader.h in Headers */,
@@ -30541,7 +30525,6 @@
BCD9C2630C17AA67005C90A2 /* JSNamedNodeMapCustom.cpp in Sources */,
A9D247F70D757E3400FDF959 /* JSNavigator.cpp in Sources */,
073BE34017D17E01002BD431 /* JSNavigatorUserMedia.cpp in Sources */,
- 073BE34817D17E7A002BD431 /* JSNavigatorUserMediaError.cpp in Sources */,
14DC0D3709FED073007B0235 /* JSNode.cpp in Sources */,
BCD9C2640C17AA67005C90A2 /* JSNodeCustom.cpp in Sources */,
14115B7209F84CD600CA4FC1 /* JSNodeFilter.cpp in Sources */,
@@ -31098,7 +31081,6 @@
51A4BB101954D62700FA5C2E /* NavigatorGamepad.cpp in Sources */,
9711460314EF009A00674FD9 /* NavigatorGeolocation.cpp in Sources */,
5EA725D51ACABD5700EAD17B /* NavigatorMediaDevices.cpp in Sources */,
- 070327F817EA4AAF00CE1318 /* NavigatorUserMediaError.cpp in Sources */,
5D874F130D161D3200796C3B /* NetscapePlugInStreamLoader.cpp in Sources */,
A19D934A1AA11B1E00B46C24 /* NetworkExtensionContentFilter.mm in Sources */,
59C27F05138D28C10079B7E2 /* NetworkResourcesData.cpp in Sources */,
Modified: trunk/Source/WebCore/bindings/js/JSDOMBinding.cpp (201079 => 201080)
--- trunk/Source/WebCore/bindings/js/JSDOMBinding.cpp 2016-05-18 14:52:20 UTC (rev 201079)
+++ trunk/Source/WebCore/bindings/js/JSDOMBinding.cpp 2016-05-18 15:22:37 UTC (rev 201080)
@@ -280,7 +280,7 @@
return errorObject;
}
-static JSValue createDOMException(ExecState* exec, ExceptionCode ec, const String& message)
+JSValue createDOMException(ExecState* exec, ExceptionCode ec, const String& message)
{
return createDOMException(exec, ec, &message);
}
Modified: trunk/Source/WebCore/bindings/js/JSDOMBinding.h (201079 => 201080)
--- trunk/Source/WebCore/bindings/js/JSDOMBinding.h 2016-05-18 14:52:20 UTC (rev 201079)
+++ trunk/Source/WebCore/bindings/js/JSDOMBinding.h 2016-05-18 15:22:37 UTC (rev 201080)
@@ -178,6 +178,7 @@
void reportCurrentException(JSC::ExecState*);
JSC::JSValue createDOMException(JSC::ExecState*, ExceptionCode);
+JSC::JSValue createDOMException(JSC::ExecState*, ExceptionCode, const String&);
// Convert a DOM implementation exception code into a _javascript_ exception in the execution state.
WEBCORE_EXPORT void setDOMException(JSC::ExecState*, ExceptionCode);
Modified: trunk/Source/WebCore/bindings/js/JSDOMPromise.cpp (201079 => 201080)
--- trunk/Source/WebCore/bindings/js/JSDOMPromise.cpp 2016-05-18 14:52:20 UTC (rev 201079)
+++ trunk/Source/WebCore/bindings/js/JSDOMPromise.cpp 2016-05-18 15:22:37 UTC (rev 201080)
@@ -27,6 +27,7 @@
#include "JSDOMPromise.h"
#include "ExceptionCode.h"
+#include "JSDOMError.h"
#include <runtime/Exception.h>
#include <runtime/JSONObject.h>
@@ -67,6 +68,15 @@
m_deferred.clear();
}
+void DeferredWrapper::reject(ExceptionCode ec, const String& message)
+{
+ ASSERT(m_deferred);
+ ASSERT(m_globalObject);
+ JSC::ExecState* state = m_globalObject->globalExec();
+ JSC::JSLockHolder locker(state);
+ reject(*state, createDOMException(state, ec, message));
+}
+
void rejectPromiseWithExceptionIfAny(JSC::ExecState& state, JSDOMGlobalObject& globalObject, JSPromiseDeferred& promiseDeferred)
{
if (!state.hadException())
Modified: trunk/Source/WebCore/bindings/js/JSDOMPromise.h (201079 => 201080)
--- trunk/Source/WebCore/bindings/js/JSDOMPromise.h 2016-05-18 14:52:20 UTC (rev 201079)
+++ trunk/Source/WebCore/bindings/js/JSDOMPromise.h 2016-05-18 15:22:37 UTC (rev 201080)
@@ -118,7 +118,7 @@
template<class RejectResultType> typename std::enable_if<PromiseResultInspector<RejectResultType>::passByConstRef, void>::type
reject(const RejectResultType& result) { rejectWithValue(result); }
- void reject(ExceptionCode);
+ void reject(ExceptionCode, const String& = { });
JSDOMGlobalObject& globalObject() const;
JSC::JSValue promise() const;
@@ -163,21 +163,12 @@
void resolve(typename PromiseResultInspector<Value>::Type value) { m_wrapper.resolve(value); }
- template<typename ErrorType> void reject(ErrorType&& error) { m_wrapper.reject(std::forward<ErrorType>(error)); }
+ template<typename... ErrorType> void reject(ErrorType&&... error) { m_wrapper.reject(std::forward<ErrorType>(error)...); }
private:
DeferredWrapper m_wrapper;
};
-inline void DeferredWrapper::reject(ExceptionCode ec)
-{
- ASSERT(m_deferred);
- ASSERT(m_globalObject);
- JSC::ExecState* exec = m_globalObject->globalExec();
- JSC::JSLockHolder locker(exec);
- reject(*exec, createDOMException(exec, ec));
-}
-
template<class ResolveResultType>
inline void DeferredWrapper::resolveWithValue(ResolveResultType&& result)
{
Modified: trunk/Source/WebCore/css/FontFaceSet.cpp (201079 => 201080)
--- trunk/Source/WebCore/css/FontFaceSet.cpp 2016-05-18 14:52:20 UTC (rev 201079)
+++ trunk/Source/WebCore/css/FontFaceSet.cpp 2016-05-18 15:22:37 UTC (rev 201080)
@@ -142,7 +142,7 @@
for (auto& face : matchingFaces) {
if (face.get().status() == CSSFontFace::Status::Failure) {
- promise.reject(DOMCoreException::create(ExceptionCodeDescription(NETWORK_ERR)));
+ promise.reject(NETWORK_ERR);
return;
}
}
@@ -222,7 +222,7 @@
}
} else {
ASSERT(newStatus == CSSFontFace::Status::Failure);
- pendingPromise->promise.reject(DOMCoreException::create(ExceptionCodeDescription(NETWORK_ERR)));
+ pendingPromise->promise.reject(NETWORK_ERR);
pendingPromise->hasReachedTerminalState = true;
}
}
Modified: trunk/Source/WebCore/dom/DOMCoreException.cpp (201079 => 201080)
--- trunk/Source/WebCore/dom/DOMCoreException.cpp 2016-05-18 14:52:20 UTC (rev 201079)
+++ trunk/Source/WebCore/dom/DOMCoreException.cpp 2016-05-18 15:22:37 UTC (rev 201080)
@@ -37,32 +37,41 @@
const char* const name;
const char* const description;
} coreExceptions[] = {
- { "IndexSizeError", "Index or size was negative, or greater than the allowed value." },
+ { "IndexSizeError", "The index is not in the allowed range." },
{ 0, 0 }, // DOMStringSizeError
- { "HierarchyRequestError", "A Node was inserted somewhere it doesn't belong." },
- { "WrongDocumentError", "A Node was used in a different document than the one that created it (that doesn't support it)." },
- { "InvalidCharacterError", "An invalid or illegal character was specified, such as in an XML name." },
+ { "HierarchyRequestError", "The operation would yield an incorrect node tree." },
+ { "WrongDocumentError", "The object is in the wrong document." },
+ { "InvalidCharacterError", "The string contains invalid characters." },
{ 0, 0 }, // NoDataAllowedError
- { "NoModificationAllowedError", "An attempt was made to modify an object where modifications are not allowed." },
- { "NotFoundError", "An attempt was made to reference a Node in a context where it does not exist." },
- { "NotSupportedError", "The implementation did not support the requested type of object or operation." },
- { "InUseAttributeError", "An attempt was made to add an attribute that is already in use elsewhere." },
- { "InvalidStateError", "An attempt was made to use an object that is not, or is no longer, usable." },
- { "SyntaxError", "An invalid or illegal string was specified." },
- { "InvalidModificationError", "An attempt was made to modify the type of the underlying object." },
- { "NamespaceError", "An attempt was made to create or change an object in a way which is incorrect with regard to namespaces." },
- { "InvalidAccessError", "A parameter or an operation was not supported by the underlying object." },
+ { "NoModificationAllowedError", "The object can not be modified." },
+ { "NotFoundError", "The object can not be found here." },
+ { "NotSupportedError", "The operation is not supported." },
+ { "InUseAttributeError", "The attribute is in use." },
+ { "InvalidStateError", "The object is in an invalid state." },
+ { "SyntaxError", "The string did not match the expected pattern." },
+ { "InvalidModificationError", " The object can not be modified in this way." },
+ { "NamespaceError", "The operation is not allowed by Namespaces in XML." },
+ { "InvalidAccessError", "The object does not support the operation or argument." },
{ 0, 0 }, // ValidationError
{ "TypeMismatchError", "The type of an object was incompatible with the expected type of the parameter associated to the object." },
- { "SecurityError", "An attempt was made to break through the security policy of the user agent." },
- // FIXME: Couldn't find a description in the HTML/DOM specifications for NETWORK_ERR, ABORT_ERR, URL_MISMATCH_ERR, and QUOTA_EXCEEDED_ERR
- { "NetworkError", "A network error occurred." },
- { "AbortError", "The user aborted a request." },
- { "URLMismatchError", "A worker global scope represented an absolute URL that is not equal to the resulting absolute URL." },
- { "QuotaExceededError", "An attempt was made to add something to storage that exceeded the quota." },
- { "TimeoutError", "A timeout occurred." },
- { "InvalidNodeTypeError", "The supplied node is invalid or has an invalid ancestor for this operation." },
- { "DataCloneError", "An object could not be cloned." }
+ { "SecurityError", "The operation is insecure." },
+ { "NetworkError", " A network error occurred." },
+ { "AbortError", "The operation was aborted." },
+ { "URLMismatchError", "The given URL does not match another URL." },
+ { "QuotaExceededError", "The quota has been exceeded." },
+ { "TimeoutError", "The operation timed out." },
+ { "InvalidNodeTypeError", "The supplied node is incorrect or has an incorrect ancestor for this operation." },
+ { "DataCloneError", "The object can not be cloned." },
+ { "EncodingError", "The encoding operation (either encoded or decoding) failed." },
+ { "NotReadableError", "The I/O read operation failed." },
+ { "UnknownError", "The operation failed for an unknown transient reason (e.g. out of memory)." },
+ { "ConstraintError", "A mutation operation in a transaction failed because a constraint was not satisfied." },
+ { "DataError", "Provided data is inadequate." },
+ { "TransactionInactiveError", "A request was placed against a transaction which is currently not active, or which is finished." },
+ { "ReadOnlyError", "The mutating operation was attempted in a \"readonly\" transaction." },
+ { "VersionError", "An attempt was made to open a database using a lower version than the existing version." },
+ { "OperationError", "The operation failed for an operation-specific reason." },
+ { "NotAllowedError", "The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission." }
};
bool DOMCoreException::initializeDescription(ExceptionCode ec, ExceptionCodeDescription* description)
Modified: trunk/Source/WebCore/dom/ExceptionCode.h (201079 => 201080)
--- trunk/Source/WebCore/dom/ExceptionCode.h 2016-05-18 14:52:20 UTC (rev 201079)
+++ trunk/Source/WebCore/dom/ExceptionCode.h 2016-05-18 15:22:37 UTC (rev 201080)
@@ -64,6 +64,18 @@
INVALID_NODE_TYPE_ERR = 24,
DATA_CLONE_ERR = 25,
+ // Others introduced in https://heycam.github.io/webidl/#idl-exceptions
+ EncodingError,
+ NotReadableError,
+ UnknownError,
+ ConstraintError,
+ DataError,
+ TransactionInactiveError,
+ ReadonlyError,
+ VersionError,
+ OperationError,
+ NotAllowedError,
+
// WebIDL exception types, handled by the binding layer.
// FIXME: Add GeneralError, EvalError, etc. when implemented in the bindings.
TypeError = 105,
Modified: trunk/Source/WebCore/html/HTMLMediaElement.cpp (201079 => 201080)
--- trunk/Source/WebCore/html/HTMLMediaElement.cpp 2016-05-18 14:52:20 UTC (rev 201079)
+++ trunk/Source/WebCore/html/HTMLMediaElement.cpp 2016-05-18 15:22:37 UTC (rev 201080)
@@ -3028,12 +3028,12 @@
LOG(Media, "HTMLMediaElement::play(%p)", this);
if (!m_mediaSession->playbackPermitted(*this)) {
- promise.reject(DOMError::create("NotAllowedError", "The request is not allowed by the user agent or the platform in the current context."));
+ promise.reject(NotAllowedError);
return;
}
if (m_error && m_error->code() == MediaError::MEDIA_ERR_SRC_NOT_SUPPORTED) {
- promise.reject(DOMError::create("NotSupportedError", "The operation is not supported.."));
+ promise.reject(NOT_SUPPORTED_ERR, "The operation is not supported.");
return;
}
@@ -3041,7 +3041,7 @@
removeBehaviorsRestrictionsAfterFirstUserGesture();
if (!playInternal())
- promise.reject(DOMError::create("NotAllowedError", "The request is not allowed by the user agent or the platform in the current context."));
+ promise.reject(NotAllowedError);
m_pendingPlayPromises.append(WTFMove(promise));
}