Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 // Flags: --expose-debug-as debug --harmony-classes | |
| 6 | |
| 7 'use strict'; | |
| 8 | |
| 9 var Debug = debug.Debug | |
| 10 | |
| 11 var done = false; | |
| 12 var stepCount = 0; | |
| 13 | |
| 14 function listener(event, execState, eventData, data) { | |
| 15 if (event == Debug.DebugEvent.Break) { | |
| 16 if (!done) { | |
| 17 execState.prepareStep(Debug.StepAction.StepInto); | |
| 18 var s = execState.frame().sourceLineText(); | |
| 19 print(s); | |
|
Dmitry Lomov (no reviews)
2014/11/14 17:19:15
stray print
arv (Not doing code reviews)
2014/11/14 19:36:58
I wanted it but I'll remove it.
arv (Not doing code reviews)
2014/11/14 22:02:22
Done.
| |
| 20 assertTrue(s.indexOf('// ' + stepCount + '.') !== -1); | |
| 21 stepCount++; | |
| 22 } | |
| 23 } | |
| 24 }; | |
| 25 | |
| 26 Debug.setListener(listener); | |
| 27 | |
| 28 function GetBase() { | |
| 29 var x = 1; // 1. | |
| 30 var y = 2; // 2. | |
| 31 done = true; // 3. | |
| 32 return null; | |
| 33 } | |
| 34 | |
| 35 function f() { | |
| 36 class Derived extends GetBase() {} // 0. | |
|
aandrey
2014/11/14 19:27:13
should it be "GetBase" instead of "GetBase()" ?
ot
arv (Not doing code reviews)
2014/11/14 19:36:58
It should be GetBase(). We are testing stepping in
| |
| 37 } | |
| 38 | |
| 39 var bp = Debug.setBreakPoint(f, 0); | |
| 40 f(); | |
| 41 assertEquals(4, stepCount); | |
| 42 | |
| 43 Debug.setListener(null); | |
| OLD | NEW |