Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(387)

Unified Diff: test/mjsunit/harmony/async-debug-caught-exception.js

Issue 2361333003: Fix crash from turning on DevTools in the middle of catch prediction (Closed)
Patch Set: Simplify code in ASYNC_AWAIT case of GetPromiseOnStackOnThrow Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/isolate.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/harmony/async-debug-caught-exception.js
diff --git a/test/mjsunit/harmony/async-debug-caught-exception.js b/test/mjsunit/harmony/async-debug-caught-exception.js
index b2ceeb99589c4128e2f8182d0f5a0a0ab83d0683..047b421d3d8d105abbbf9f7f01332dd16b6d18b2 100644
--- a/test/mjsunit/harmony/async-debug-caught-exception.js
+++ b/test/mjsunit/harmony/async-debug-caught-exception.js
@@ -121,3 +121,24 @@ assertNull(exception);
Debug.clearBreakOnUncaughtException();
Debug.setListener(null);
+
+// If devtools is turned on in the middle, then catch prediction
+// could be wrong (here, it mispredicts the exception as caught),
+// but shouldn't crash.
+
+log = [];
+
+var resolve;
+var turnOnListenerPromise = new Promise(r => resolve = r);
+async function confused() {
+ await turnOnListenerPromise;
+ throw foo
+}
+confused();
+Promise.resolve().then(() => {
+ Debug.setListener(listener);
+ Debug.setBreakOnUncaughtException();
+ resolve();
+});
+
+assertEquals([], log);
« no previous file with comments | « src/isolate.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698