Chromium Code Reviews| Index: test/mjsunit/debug-compile-event.js |
| diff --git a/test/mjsunit/debug-compile-event.js b/test/mjsunit/debug-compile-event.js |
| index c38cd8477a9fe4d53b110f419d7b099292a111ff..5901e51c02325a32963d385093906b474d7dd002 100644 |
| --- a/test/mjsunit/debug-compile-event.js |
| +++ b/test/mjsunit/debug-compile-event.js |
| @@ -37,7 +37,7 @@ var current_source = ''; // Current source being compiled. |
| var source_count = 0; // Total number of scources compiled. |
| var host_compilations = 0; // Number of scources compiled through the API. |
| var eval_compilations = 0; // Number of scources compiled through eval. |
| - |
| +var mute_listener = false; |
| function compileSource(source) { |
| current_source = source; |
| @@ -47,6 +47,7 @@ function compileSource(source) { |
| function listener(event, exec_state, event_data, data) { |
| + if (mute_listener) return; |
| try { |
| if (event == Debug.DebugEvent.BeforeCompile || |
| event == Debug.DebugEvent.AfterCompile || |
| @@ -81,7 +82,9 @@ function listener(event, exec_state, event_data, data) { |
| } |
| // Check that script context is included into the event message. |
| var json = event_data.toJSONProtocol(); |
| + mute_listener = true; |
| var msg = eval('(' + json + ')'); |
|
yurys
2014/12/08 14:31:22
try/finally
kozy
2014/12/08 14:53:01
Done.
|
| + mute_listener = false; |
| assertTrue('context' in msg.body.script); |
| // Check that we pick script name from //# sourceURL, iff present |