From: yurys@chromium.org Date: Tue, 12 May 2009 09:08:01 +0000 (+0000) Subject: Script context information is included in before/afterCompile events. X-Git-Tag: upstream/4.7.83~24145 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=052d63f5bdcbfdcbb5adf66c1019dd47e464ae4a;p=platform%2Fupstream%2Fv8.git 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 --- diff --git a/src/debug-delay.js b/src/debug-delay.js index ff7d6fb..865b2ba 100644 --- a/src/debug-delay.js +++ b/src/debug-delay.js @@ -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(); } diff --git a/test/mjsunit/debug-compile-event.js b/test/mjsunit/debug-compile-event.js index 035e36c..18975de 100644 --- a/test/mjsunit/debug-compile-event.js +++ b/test/mjsunit/debug-compile-event.js @@ -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