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++) {
--- /dev/null
+// Copyright 2015 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --gc-interval=33 --expose-gc --allow-natives-syntax
+
+%DebugGetLoadedScripts();