OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 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 function f() { |
| 6 debugger; |
| 7 } |
| 8 |
| 9 function g() { |
| 10 f(); |
| 11 } |
| 12 |
| 13 function h() { |
| 14 'use strict'; |
| 15 return g(); |
| 16 } |
| 17 |
| 18 h(); |
| 19 h(); |
| 20 |
| 21 var Debug = debug.Debug; |
| 22 var exception = null; |
| 23 |
| 24 function listener(event, exec_state, event_data, data) { |
| 25 if (event != Debug.DebugEvent.Break) return; |
| 26 try { |
| 27 var all_scopes = exec_state.frame().allScopes(); |
| 28 } catch (e) { |
| 29 exception = e; |
| 30 } |
| 31 } |
| 32 |
| 33 Debug.setListener(listener); |
| 34 %OptimizeFunctionOnNextCall(h); |
| 35 h(); |
| 36 Debug.setListener(null); |
| 37 assertNull(exception); |
OLD | NEW |