Title: [264802] trunk
- Revision
- 264802
- Author
- [email protected]
- Date
- 2020-07-23 15:35:06 -0700 (Thu, 23 Jul 2020)
Log Message
We should have exception check after promise operation
https://bugs.webkit.org/show_bug.cgi?id=214610
<rdar://problem/65881794>
Reviewed by Youenn Fablet and Mark Lam.
Source/WebCore:
Test: js/dom/promise-should-have-exception-check-on-operation.html
Add exception check after promise operations.
* bindings/js/JSDOMPromiseDeferred.cpp:
(WebCore::DeferredPromise::reject):
LayoutTests:
* js/dom/promise-should-have-exception-check-on-operation-expected.txt: Added.
* js/dom/promise-should-have-exception-check-on-operation.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (264801 => 264802)
--- trunk/LayoutTests/ChangeLog 2020-07-23 22:33:57 UTC (rev 264801)
+++ trunk/LayoutTests/ChangeLog 2020-07-23 22:35:06 UTC (rev 264802)
@@ -1,3 +1,14 @@
+2020-07-23 Yusuke Suzuki <[email protected]>
+
+ We should have exception check after promise operation
+ https://bugs.webkit.org/show_bug.cgi?id=214610
+ <rdar://problem/65881794>
+
+ Reviewed by Youenn Fablet and Mark Lam.
+
+ * js/dom/promise-should-have-exception-check-on-operation-expected.txt: Added.
+ * js/dom/promise-should-have-exception-check-on-operation.html: Added.
+
2020-07-23 Keith Miller <[email protected]>
iOS simulator does not support WebAssembly
Added: trunk/LayoutTests/js/dom/promise-should-have-exception-check-on-operation-expected.txt (0 => 264802)
--- trunk/LayoutTests/js/dom/promise-should-have-exception-check-on-operation-expected.txt (rev 0)
+++ trunk/LayoutTests/js/dom/promise-should-have-exception-check-on-operation-expected.txt 2020-07-23 22:35:06 UTC (rev 264802)
@@ -0,0 +1,9 @@
+Promise should have exception check on operation
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Added: trunk/LayoutTests/js/dom/promise-should-have-exception-check-on-operation.html (0 => 264802)
--- trunk/LayoutTests/js/dom/promise-should-have-exception-check-on-operation.html (rev 0)
+++ trunk/LayoutTests/js/dom/promise-should-have-exception-check-on-operation.html 2020-07-23 22:35:06 UTC (rev 264802)
@@ -0,0 +1,14 @@
+<!DOCTYPE html><!-- webkit-test-runner [ jscOptions=--validateExceptionChecks=true ] -->
+<html>
+<head>
+<script src=""
+</head>
+<body>
+<script>
+description("Promise should have exception check on operation");
+if (typeof SubtleCrypto !== "undefined")
+ SubtleCrypto.prototype.deriveBits();
+</script>
+<script src=""
+</body>
+</html>
Modified: trunk/Source/WebCore/ChangeLog (264801 => 264802)
--- trunk/Source/WebCore/ChangeLog 2020-07-23 22:33:57 UTC (rev 264801)
+++ trunk/Source/WebCore/ChangeLog 2020-07-23 22:35:06 UTC (rev 264802)
@@ -1,3 +1,18 @@
+2020-07-23 Yusuke Suzuki <[email protected]>
+
+ We should have exception check after promise operation
+ https://bugs.webkit.org/show_bug.cgi?id=214610
+ <rdar://problem/65881794>
+
+ Reviewed by Youenn Fablet and Mark Lam.
+
+ Test: js/dom/promise-should-have-exception-check-on-operation.html
+
+ Add exception check after promise operations.
+
+ * bindings/js/JSDOMPromiseDeferred.cpp:
+ (WebCore::DeferredPromise::reject):
+
2020-07-23 Jer Noble <[email protected]>
[Cocoa|WebM] Seeking can leave parser in hung state
Modified: trunk/Source/WebCore/bindings/js/JSDOMPromiseDeferred.cpp (264801 => 264802)
--- trunk/Source/WebCore/bindings/js/JSDOMPromiseDeferred.cpp 2020-07-23 22:33:57 UTC (rev 264801)
+++ trunk/Source/WebCore/bindings/js/JSDOMPromiseDeferred.cpp 2020-07-23 22:35:06 UTC (rev 264802)
@@ -142,7 +142,7 @@
return;
}
- auto scope = DECLARE_THROW_SCOPE(lexicalGlobalObject.vm());
+ auto scope = DECLARE_CATCH_SCOPE(lexicalGlobalObject.vm());
auto error = createDOMException(lexicalGlobalObject, WTFMove(exception));
if (UNLIKELY(scope.exception())) {
ASSERT(isTerminatedExecutionException(lexicalGlobalObject.vm(), scope.exception()));
@@ -175,7 +175,7 @@
return;
}
- auto scope = DECLARE_THROW_SCOPE(lexicalGlobalObject.vm());
+ auto scope = DECLARE_CATCH_SCOPE(lexicalGlobalObject.vm());
auto error = createDOMException(&lexicalGlobalObject, ec, message);
if (UNLIKELY(scope.exception())) {
ASSERT(isTerminatedExecutionException(lexicalGlobalObject.vm(), scope.exception()));
@@ -184,6 +184,7 @@
reject(lexicalGlobalObject, error, rejectAsHandled);
+ EXCEPTION_ASSERT(!scope.exception() || isTerminatedExecutionException(lexicalGlobalObject.vm(), scope.exception()));
}
void DeferredPromise::reject(const JSC::PrivateName& privateName, RejectAsHandled rejectAsHandled)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes