Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1958)

Unified Diff: test/mjsunit/debug-compile-event.js

Issue 642863007: [V8] Send AfterCompile and CompileError messages in debug scope (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/mjsunit/debug-clearbreakpointgroup.js ('k') | test/mjsunit/debug-evaluate-with-context.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..5b745be5893cde59af4ee5aa3e6ffe1a9c62795f 100644
--- a/test/mjsunit/debug-compile-event.js
+++ b/test/mjsunit/debug-compile-event.js
@@ -37,6 +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 ignore_events = false;
function compileSource(source) {
@@ -47,6 +48,7 @@ function compileSource(source) {
function listener(event, exec_state, event_data, data) {
+ if (ignore_events) return;
try {
if (event == Debug.DebugEvent.BeforeCompile ||
event == Debug.DebugEvent.AfterCompile ||
@@ -81,7 +83,9 @@ function listener(event, exec_state, event_data, data) {
}
// Check that script context is included into the event message.
var json = event_data.toJSONProtocol();
+ ignore_events = true;
var msg = eval('(' + json + ')');
+ ignore_events = false;
assertTrue('context' in msg.body.script);
// Check that we pick script name from //# sourceURL, iff present
@@ -117,7 +121,7 @@ try {
}
// Make sure that the debug event listener was invoked.
-assertFalse(exception, "exception in listener")
+assertFalse(exception, "exception in listener");
// Number of before and after + error events should be the same.
assertEquals(before_compile_count, after_compile_count + compile_error_count);
« no previous file with comments | « test/mjsunit/debug-clearbreakpointgroup.js ('k') | test/mjsunit/debug-evaluate-with-context.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698