| Index: test/mjsunit/regress/debug-prepare-step-in.js
|
| diff --git a/test/mjsunit/function-source.js b/test/mjsunit/regress/debug-prepare-step-in.js
|
| similarity index 79%
|
| copy from test/mjsunit/function-source.js
|
| copy to test/mjsunit/regress/debug-prepare-step-in.js
|
| index 8f2fc2265c364ed4d779057a96acc62518e306a2..b8c21164000bd9df01024fdfad6225c1bd217d3d 100644
|
| --- a/test/mjsunit/function-source.js
|
| +++ b/test/mjsunit/regress/debug-prepare-step-in.js
|
| @@ -1,4 +1,4 @@
|
| -// Copyright 2008 the V8 project authors. All rights reserved.
|
| +// Copyright 2013 the V8 project authors. All rights reserved.
|
| // Redistribution and use in source and binary forms, with or without
|
| // modification, are permitted provided that the following conditions are
|
| // met:
|
| @@ -25,25 +25,30 @@
|
| // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
| // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
| -// Flags: --expose-debug-as debug
|
| +// Flags: --expose-debug-as debug --allow-natives-syntax --expose-gc
|
| // Get the Debug object exposed from the debug context global object.
|
| Debug = debug.Debug
|
|
|
| -// Check that the script source for all functions in a script is the same.
|
| -function f() {
|
| - function h() {
|
| - assertEquals(Debug.scriptSource(f), Debug.scriptSource(h));
|
| - }
|
| - h();
|
| +function breakListener(event, exec_state, event_data, data) {
|
| + exec_state.prepareStep(Debug.StepAction.StepIn, 1);
|
| }
|
|
|
| +Debug.setListener(breakListener);
|
| +
|
| +var o = {x:function() { return 10; }};
|
| +
|
| +function f(o) {
|
| + var m = "x";
|
| + o[m]();
|
| +}
|
| +
|
| +Debug.setBreakPoint(f, 2, 0);
|
| +
|
| +f(o);
|
| +
|
| +%NotifyContextDisposed();
|
| function g() {
|
| - function h() {
|
| - assertEquals(Debug.scriptSource(f), Debug.scriptSource(h));
|
| - }
|
| - h();
|
| + gc();
|
| }
|
|
|
| -assertEquals(Debug.scriptSource(f), Debug.scriptSource(g));
|
| -f();
|
| g();
|
|
|