Index: src/runtime/runtime-debug.cc |
diff --git a/src/runtime/runtime-debug.cc b/src/runtime/runtime-debug.cc |
index b4e1fe90c4859e202f8f4dbd6581d02747bb94a7..baa550829cb0ed79effd4e24a5db54cd06ba9a18 100644 |
--- a/src/runtime/runtime-debug.cc |
+++ b/src/runtime/runtime-debug.cc |
@@ -2338,9 +2338,12 @@ RUNTIME_FUNCTION(Runtime_DebugGetLoadedScripts) { |
HandleScope scope(isolate); |
DCHECK(args.length() == 0); |
- DebugScope debug_scope(isolate->debug()); |
- // Fill the script objects. |
- Handle<FixedArray> instances = isolate->debug()->GetLoadedScripts(); |
+ Handle<FixedArray> instances; |
+ { |
+ DebugScope debug_scope(isolate->debug()); |
+ // Fill the script objects. |
+ instances = isolate->debug()->GetLoadedScripts(); |
+ } |
// Convert the script objects to proper JS objects. |
for (int i = 0; i < instances->length(); i++) { |