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}
This commit is contained in:
parent
2b59959c71
commit
3a4d073f1d
@ -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++) {
|
||||
|
7
test/mjsunit/regress/regress-crbug-474297.js
Normal file
7
test/mjsunit/regress/regress-crbug-474297.js
Normal file
@ -0,0 +1,7 @@
|
||||
// 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();
|
Loading…
Reference in New Issue
Block a user