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

Unified Diff: test/mjsunit/es6/debug-promises-throw-in-reject.js

Issue 262533009: Revert "Trigger exception debug event for promises at the throw site." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 8 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
Index: test/mjsunit/es6/debug-promises-throw-in-reject.js
diff --git a/test/mjsunit/es6/debug-promises-throw-in-reject.js b/test/mjsunit/es6/debug-promises-throw-in-reject.js
index cdf759606c68a2c152d0ac50d5ce982ac2872ef8..6ae064dcd291d9bdd22d3eedf8ef1b417564ac65 100644
--- a/test/mjsunit/es6/debug-promises-throw-in-reject.js
+++ b/test/mjsunit/es6/debug-promises-throw-in-reject.js
@@ -6,7 +6,7 @@
// Test debug events when an exception is thrown inside a Promise, which is
// caught by a custom promise, which throws a new exception in its reject
-// handler. We expect an Exception debug event with a promise to be triggered.
+// handler. We expect a PendingExceptionInPromise event to be triggered.
Debug = debug.Debug;
@@ -21,7 +21,7 @@ var p = new Promise(function(resolve, reject) {
function MyPromise(resolver) {
var reject = function() {
log.push("throw reject");
- throw new Error("reject"); // event
+ throw new Error("reject");
};
var resolve = function() { };
log.push("construct");
@@ -39,12 +39,12 @@ var q = p.chain(
function listener(event, exec_state, event_data, data) {
try {
- if (event == Debug.DebugEvent.Exception) {
+ if (event == Debug.DebugEvent.PendingExceptionInPromise) {
assertEquals(["resolve", "construct", "end main",
"throw caught", "throw reject"], log);
- assertEquals("reject", event_data.exception().message);
- assertEquals(q, event_data.promise());
- assertTrue(exec_state.frame(0).sourceLineText().indexOf('// event') > 0);
+ assertEquals("caught", event_data.exception().message);
+ } else if (event == Debug.DebugEvent.Exception) {
+ assertUnreachable();
}
} catch (e) {
// Signal a failure with exit code 1. This is necessary since the
« no previous file with comments | « test/mjsunit/es6/debug-promises-throw-in-constructor.js ('k') | test/mjsunit/es6/debug-promises-uncaught-all.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698