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

Unified Diff: src/runtime.cc

Issue 249503002: Trigger debug event on not yet caught exception in promises. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: always use original exception 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: src/runtime.cc
diff --git a/src/runtime.cc b/src/runtime.cc
index c508b4a644fb2540caf3c178d11af3ab7841a057..bd966ccec90239badf7353b9d7ea81e683d0ab25 100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -5613,7 +5613,6 @@ RUNTIME_FUNCTION(Runtime_StoreArrayLiteralElement) {
// Check whether debugger and is about to step into the callback that is passed
// to a built-in function such as Array.forEach.
RUNTIME_FUNCTION(Runtime_DebugCallbackSupportsStepping) {
- SealHandleScope shs(isolate);
#ifdef ENABLE_DEBUGGER_SUPPORT
ASSERT(args.length() == 1);
if (!isolate->IsDebuggerActive() || !isolate->debug()->StepInActive()) {
@@ -5632,7 +5631,6 @@ RUNTIME_FUNCTION(Runtime_DebugCallbackSupportsStepping) {
// Set one shot breakpoints for the callback function that is passed to a
// built-in function such as Array.forEach to enable stepping into the callback.
RUNTIME_FUNCTION(Runtime_DebugPrepareStepInIfStepping) {
- SealHandleScope shs(isolate);
#ifdef ENABLE_DEBUGGER_SUPPORT
ASSERT(args.length() == 1);
Debug* debug = isolate->debug();
@@ -5649,6 +5647,19 @@ RUNTIME_FUNCTION(Runtime_DebugPrepareStepInIfStepping) {
}
+// Notify the debugger if an expcetion in a promise is not caught (yet).
+RUNTIME_FUNCTION(Runtime_DebugPendingExceptionInPromise) {
+#ifdef ENABLE_DEBUGGER_SUPPORT
+ ASSERT(args.length() == 2);
+ HandleScope scope(isolate);
+ CONVERT_ARG_HANDLE_CHECKED(Object, exception, 0);
+ CONVERT_ARG_HANDLE_CHECKED(JSObject, promise, 1);
+ isolate->debugger()->OnException(exception, true, promise);
+#endif // ENABLE_DEBUGGER_SUPPORT
+ return isolate->heap()->undefined_value();
+}
+
+
// Set a local property, even if it is READ_ONLY. If the property does not
// exist, it will be added with attributes NONE.
RUNTIME_FUNCTION(Runtime_IgnoreAttributesAndSetProperty) {

Powered by Google App Engine
This is Rietveld 408576698