| 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 22 matching lines...) Expand all Loading... |
| 33 | 33 |
| 34 var m = (0, function() { | 34 var m = (0, function() { |
| 35 new f(1); | 35 new f(1); |
| 36 }); | 36 }); |
| 37 | 37 |
| 38 function g() { | 38 function g() { |
| 39 m(); | 39 m(); |
| 40 }; | 40 }; |
| 41 | 41 |
| 42 | 42 |
| 43 // Get the Debug object exposed from the debug context global object. | |
| 44 Debug = debug.Debug | 43 Debug = debug.Debug |
| 45 | 44 |
| 46 listenerCalled = false; | 45 listenerCalled = false; |
| 47 exception = false; | 46 exception = false; |
| 48 | 47 |
| 49 function listener(event, exec_state, event_data, data) { | 48 function listener(event, exec_state, event_data, data) { |
| 50 try { | 49 try { |
| 51 if (event == Debug.DebugEvent.Break) { | 50 if (event == Debug.DebugEvent.Break) { |
| 52 // The expected backtrace is | 51 // The expected backtrace is |
| 53 // 0: f | 52 // 0: f |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 // Add the debug event listener. | 89 // Add the debug event listener. |
| 91 Debug.setListener(listener); | 90 Debug.setListener(listener); |
| 92 | 91 |
| 93 // Set a break point and call to invoke the debug event listener. | 92 // Set a break point and call to invoke the debug event listener. |
| 94 Debug.setBreakPoint(f, 0, 0); | 93 Debug.setBreakPoint(f, 0, 0); |
| 95 g(); | 94 g(); |
| 96 | 95 |
| 97 // Make sure that the debug event listener vas invoked. | 96 // Make sure that the debug event listener vas invoked. |
| 98 assertFalse(exception, "exception in listener"); | 97 assertFalse(exception, "exception in listener"); |
| 99 assertTrue(listenerCalled); | 98 assertTrue(listenerCalled); |
| OLD | NEW |