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

Unified Diff: src/runtime/runtime-debug.cc

Issue 1219693003: A couple of other "stack overflow" vs. "has_pending_exception()" issues in debugger fixed. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 6 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 | « no previous file | test/mjsunit/regress/regress-crbug-505007-1.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-debug.cc
diff --git a/src/runtime/runtime-debug.cc b/src/runtime/runtime-debug.cc
index 5baa151488f1e03cdf16026751ac31c09cd86b6d..8ddc494428f9726df604c0c4808e5666b1cf6c28 100644
--- a/src/runtime/runtime-debug.cc
+++ b/src/runtime/runtime-debug.cc
@@ -3022,6 +3022,11 @@ RUNTIME_FUNCTION(Runtime_ExecuteInDebugContext) {
CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0);
DebugScope debug_scope(isolate->debug());
+ if (debug_scope.failed()) {
+ DCHECK(isolate->has_pending_exception());
+ return isolate->heap()->exception();
+ }
+
Handle<Object> result;
ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
isolate, result,
@@ -3037,6 +3042,10 @@ RUNTIME_FUNCTION(Runtime_GetDebugContext) {
Handle<Context> context;
{
DebugScope debug_scope(isolate->debug());
+ if (debug_scope.failed()) {
+ DCHECK(isolate->has_pending_exception());
+ return isolate->heap()->exception();
+ }
context = isolate->debug()->GetDebugContext();
}
if (context.is_null()) return isolate->heap()->undefined_value();
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-crbug-505007-1.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698