Commit 3a4d073f authored by yangguo's avatar yangguo Committed by Commit bot

Create result array of %DebugGetLoadedScripts outside the debug context.

R=jarin@chromium.org
BUG=chromium:474297
LOG=N

Review URL: https://codereview.chromium.org/1062143002

Cr-Commit-Position: refs/heads/master@{#27659}
parent 2b59959c
......@@ -2338,9 +2338,12 @@ RUNTIME_FUNCTION(Runtime_DebugGetLoadedScripts) {
HandleScope scope(isolate);
DCHECK(args.length() == 0);
Handle<FixedArray> instances;
{
DebugScope debug_scope(isolate->debug());
// Fill the script objects.
Handle<FixedArray> instances = isolate->debug()->GetLoadedScripts();
instances = isolate->debug()->GetLoadedScripts();
}
// Convert the script objects to proper JS objects.
for (int i = 0; i < instances->length(); i++) {
......
// 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();
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment