OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 // Debug event listener which delegates. | 45 // Debug event listener which delegates. |
46 function listener(event, exec_state, event_data, data) { | 46 function listener(event, exec_state, event_data, data) { |
47 try { | 47 try { |
48 if (event == Debug.DebugEvent.Break) { | 48 if (event == Debug.DebugEvent.Break) { |
49 break_count++; | 49 break_count++; |
50 listener_called = true; | 50 listener_called = true; |
51 listener_delegate(exec_state); | 51 listener_delegate(exec_state); |
52 } | 52 } |
53 } catch (e) { | 53 } catch (e) { |
54 exception = e; | 54 exception = e; |
| 55 print(e + e.stack); |
55 } | 56 } |
56 } | 57 } |
57 | 58 |
58 // Add the debug event listener. | 59 // Add the debug event listener. |
59 Debug.setListener(listener); | 60 Debug.setListener(listener); |
60 | 61 |
61 | 62 |
62 // Initialize for a new test. | 63 // Initialize for a new test. |
63 function BeginTest(name) { | 64 function BeginTest(name) { |
64 test_name = name; | 65 test_name = name; |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 CheckScopeChain([debug.ScopeType.Local, | 208 CheckScopeChain([debug.ScopeType.Local, |
208 debug.ScopeType.Block, | 209 debug.ScopeType.Block, |
209 debug.ScopeType.Closure, | 210 debug.ScopeType.Closure, |
210 debug.ScopeType.Global], exec_state); | 211 debug.ScopeType.Global], exec_state); |
211 CheckScopeContent({}, 0, exec_state); | 212 CheckScopeContent({}, 0, exec_state); |
212 CheckScopeContent({z:4}, 1, exec_state); | 213 CheckScopeContent({z:4}, 1, exec_state); |
213 CheckScopeContent({a:1,x:2,y:3}, 2, exec_state); | 214 CheckScopeContent({a:1,x:2,y:3}, 2, exec_state); |
214 }; | 215 }; |
215 closure_1(1)(); | 216 closure_1(1)(); |
216 EndTest(); | 217 EndTest(); |
OLD | NEW |