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

Unified Diff: src/runtime.cc

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
« no previous file with comments | « src/runtime.h ('k') | test/mjsunit/es6/debug-promises-caught-all.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime.cc
diff --git a/src/runtime.cc b/src/runtime.cc
index 216009b4ee2507bf3c4fe3f1df59976b403fdc93..7eddc41977d0d335b4495072e17c365a57639651 100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -5657,22 +5657,13 @@ RUNTIME_FUNCTION(Runtime_DebugPrepareStepInIfStepping) {
}
-// The argument is a closure that is kept until the epilogue is called.
-// On exception, the closure is called, which returns the promise if the
-// exception is considered uncaught, or undefined otherwise.
-RUNTIME_FUNCTION(Runtime_DebugPromiseHandlePrologue) {
- ASSERT(args.length() == 1);
+// Notify the debugger if an expcetion in a promise is not caught (yet).
+RUNTIME_FUNCTION(Runtime_DebugPendingExceptionInPromise) {
+ ASSERT(args.length() == 2);
HandleScope scope(isolate);
- CONVERT_ARG_HANDLE_CHECKED(JSFunction, promise_getter, 0);
- isolate->debug()->PromiseHandlePrologue(promise_getter);
- return isolate->heap()->undefined_value();
-}
-
-
-RUNTIME_FUNCTION(Runtime_DebugPromiseHandleEpilogue) {
- ASSERT(args.length() == 0);
- SealHandleScope shs(isolate);
- isolate->debug()->PromiseHandleEpilogue();
+ CONVERT_ARG_HANDLE_CHECKED(Object, exception, 0);
+ CONVERT_ARG_HANDLE_CHECKED(JSObject, promise, 1);
+ isolate->debugger()->OnException(exception, true, promise);
return isolate->heap()->undefined_value();
}
« no previous file with comments | « src/runtime.h ('k') | test/mjsunit/es6/debug-promises-caught-all.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698