Commit 052d63f5 authored by yurys@chromium.org's avatar yurys@chromium.org

Script context information is included in before/afterCompile events.

Review URL: http://codereview.chromium.org/115128

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1911 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 1a54dd01
......@@ -984,7 +984,8 @@ CompileEvent.prototype.toJSONProtocol = function() {
o.event = "afterCompile";
}
o.body = {};
o.body.script = MakeScriptObject_(this.script_, true);
o.body.script = this.script_;
o.setOption('includeSource', true);
return o.toJSONProtocol();
}
......
......@@ -65,6 +65,10 @@ function listener(event, exec_state, event_data, data) {
// exact source.
assertEquals(current_source, event_data.script().source());
}
// Check that script context is included into the event message.
var json = event_data.toJSONProtocol();
var msg = eval('(' + json + ')');
assertTrue('context' in msg.body.script);
}
} catch (e) {
exception = e
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment