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(); |
} |