Reviewers: ulan,
Description:
Correctly find shared function info for debugging when compiling eagerly.
[email protected]
BUG=v8:3717
Please review this at https://codereview.chromium.org/758523004/
Base URL: https://chromium.googlesource.com/v8/v8.git@master
Affected files (+34, -1 lines):
M src/debug.cc
A test/mjsunit/regress/regress-3717.js
Index: src/debug.cc
diff --git a/src/debug.cc b/src/debug.cc
index
86bfbbcb643475ce65fd8dfaae5384ccaa052f54..0fb006f822357774f1be977c25baa931865b05f7
100644
--- a/src/debug.cc
+++ b/src/debug.cc
@@ -2121,7 +2121,7 @@ Object*
Debug::FindSharedFunctionInfoInScript(Handle<Script> script,
Heap* heap = isolate_->heap();
while (!done) {
{ // Extra scope for iterator.
- HeapIterator iterator(heap);
+ HeapIterator iterator(heap, HeapIterator::kFilterUnreachable);
for (HeapObject* obj = iterator.next();
obj != NULL; obj = iterator.next()) {
bool found_next_candidate = false;
Index: test/mjsunit/regress/regress-3717.js
diff --git a/test/mjsunit/regress/regress-3717.js
b/test/mjsunit/regress/regress-3717.js
new file mode 100644
index
0000000000000000000000000000000000000000..1f7bc7d1261eea0701cf2886e3f61b63e7c72993
--- /dev/null
+++ b/test/mjsunit/regress/regress-3717.js
@@ -0,0 +1,33 @@
+// Copyright 2014 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: --expose-debug-as debug --no-lazy
+
+Debug = debug.Debug;
+var exception = null;
+var break_count = 0;
+
+function f() {
+ function g(p) {
+ return 1;
+ }
+ g(1);
+};
+
+function listener(event, exec_state, event_data, data) {
+ try {
+ if (event == Debug.DebugEvent.Break) break_count++;
+ } catch (e) {
+ exception = e;
+ }
+}
+
+Debug.setListener(listener);
+var bp = Debug.setBreakPoint(f, 2);
+f();
+Debug.clearBreakPoint(bp);
+Debug.setListener(null);
+
+assertEquals(1, break_count);
+assertNull(exception);
--
--
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.