Reviewers: jarin,
Description:
Create result array of %DebugGetLoadedScripts outside the debug context.
[email protected]
BUG=chromium:474297
LOG=N
Please review this at https://codereview.chromium.org/1062143002/
Base URL: https://chromium.googlesource.com/v8/v8.git@master
Affected files (+8, -8 lines):
M src/runtime/runtime-debug.cc
A + test/mjsunit/regress/regress-crbug-474297.js
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++) {
Index: test/mjsunit/regress/regress-crbug-474297.js
diff --git a/test/mjsunit/compiler/regress-416359.js
b/test/mjsunit/regress/regress-crbug-474297.js
similarity index 65%
copy from test/mjsunit/compiler/regress-416359.js
copy to test/mjsunit/regress/regress-crbug-474297.js
index
18cdc5e72800ab16c49ea2f2091b88ba1c873248..3169c2815aae84bec4a38fb317e4091356b84510
100644
--- a/test/mjsunit/compiler/regress-416359.js
+++ b/test/mjsunit/regress/regress-crbug-474297.js
@@ -2,9 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-"use strict"
-function f() {
- for (x in {a:0});
-}
+// Flags: --gc-interval=33 --expose-gc --allow-natives-syntax
-assertThrows(f);
+%DebugGetLoadedScripts();
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.