| OLD | NEW |
| 1 // Copyright 2008 the V8 project authors. All rights reserved. | 1 // Copyright 2008 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 27 | 27 |
| 28 // Flags: --expose-debug-as debug | 28 // Flags: --expose-debug-as debug |
| 29 // The functions used for testing backtraces. They are at the top to make the | 29 // The functions used for testing backtraces. They are at the top to make the |
| 30 // testing of source line/column easier. | 30 // testing of source line/column easier. |
| 31 function f(x, y) { | 31 function f(x, y) { |
| 32 a=1; | 32 a=1; |
| 33 }; | 33 }; |
| 34 | 34 |
| 35 var m = function() { | 35 var m = (0, function() { |
| 36 new f(1); | 36 new f(1); |
| 37 }; | 37 }); |
| 38 | 38 |
| 39 function g() { | 39 function g() { |
| 40 m(); | 40 m(); |
| 41 }; | 41 }; |
| 42 | 42 |
| 43 | 43 |
| 44 // Get the Debug object exposed from the debug context global object. | 44 // Get the Debug object exposed from the debug context global object. |
| 45 Debug = debug.Debug | 45 Debug = debug.Debug |
| 46 | 46 |
| 47 listenerCalled = false; | 47 listenerCalled = false; |
| (...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 262 // Add the debug event listener. | 262 // Add the debug event listener. |
| 263 Debug.setListener(listener); | 263 Debug.setListener(listener); |
| 264 | 264 |
| 265 // Set a break point and call to invoke the debug event listener. | 265 // Set a break point and call to invoke the debug event listener. |
| 266 Debug.setBreakPoint(f, 0, 0); | 266 Debug.setBreakPoint(f, 0, 0); |
| 267 g(); | 267 g(); |
| 268 | 268 |
| 269 // Make sure that the debug event listener vas invoked. | 269 // Make sure that the debug event listener vas invoked. |
| 270 assertFalse(exception, "exception in listener"); | 270 assertFalse(exception, "exception in listener"); |
| 271 assertTrue(listenerCalled); | 271 assertTrue(listenerCalled); |
| OLD | NEW |