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

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

Issue 1136733002: Don't create debug context if debug listener is not set (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed review comment Created 5 years, 7 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/debug.cc ('k') | test/cctest/test-debug.cc » ('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 591c8650e24b4305f0961a2e87924c377ab35534..9696b76264362664fcb10f98148684c082981aae 100644
--- a/src/runtime/runtime-debug.cc
+++ b/src/runtime/runtime-debug.cc
@@ -2833,7 +2833,11 @@ RUNTIME_FUNCTION(Runtime_ExecuteInDebugContext) {
RUNTIME_FUNCTION(Runtime_GetDebugContext) {
HandleScope scope(isolate);
DCHECK(args.length() == 0);
- Handle<Context> context = isolate->debug()->GetDebugContext();
+ Handle<Context> context;
+ {
+ DebugScope debug_scope(isolate->debug());
+ context = isolate->debug()->GetDebugContext();
+ }
if (context.is_null()) return isolate->heap()->undefined_value();
context->set_security_token(isolate->native_context()->security_token());
return context->global_proxy();
« no previous file with comments | « src/debug.cc ('k') | test/cctest/test-debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698