Index: test/mjsunit/ignition/debug-scope-on-return.js |
diff --git a/test/mjsunit/ignition/debug-scope-on-return.js b/test/mjsunit/ignition/debug-scope-on-return.js |
new file mode 100644 |
index 0000000000000000000000000000000000000000..5be6de6e65eaea5b09c341d8ce10e4b11c3db89b |
--- /dev/null |
+++ b/test/mjsunit/ignition/debug-scope-on-return.js |
@@ -0,0 +1,31 @@ |
+// Copyright 2016 the V8 project authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
Michael Achenbach
2016/03/16 18:59:03
Please skip this test with ignition+msan:
https://
|
+// found in the LICENSE file. |
+ |
+// Flags: --expose-debug-as debug |
+ |
+// Check that the we are still in function context when we break on return. |
+ |
+var Debug = debug.Debug; |
+ |
+function listener(event, exec_state, event_data, data) { |
+ if (event == Debug.DebugEvent.Break) { |
+ // Access scope details to check the context is correct. |
+ var scope_count = exec_state.frame().scopeCount(); |
+ // Do steps until we reach the global scope again. |
+ exec_state.prepareStep(Debug.StepAction.StepIn); |
+ } |
+} |
+ |
+Debug.setListener(listener); |
+ |
+function f() { |
+ debugger; |
+ |
+ L: with ({x:12}) { |
+ break L; |
+ } |
+ |
+ return; |
+} |
+f(); |