Reviewers: Søren Gjesse,

Message:
I think that for consistency BreakEvent and ExceptionEvent should also
serialize ScriptMirror into the .script field instead of calling
MakeScriptObject_.

Description:
Script context information is included in before/afterCompile events.

Please review this at http://codereview.chromium.org/115128

SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/

Affected files:
   M     src/debug-delay.js
   M     test/mjsunit/debug-compile-event.js


Index: test/mjsunit/debug-compile-event.js
===================================================================
--- test/mjsunit/debug-compile-event.js (revision 1903)
+++ test/mjsunit/debug-compile-event.js (working copy)
@@ -65,6 +65,10 @@
          // 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
Index: src/debug-delay.js
===================================================================
--- src/debug-delay.js  (revision 1903)
+++ src/debug-delay.js  (working copy)
@@ -984,7 +984,8 @@
      o.event = "afterCompile";
    }
    o.body = {};
-  o.body.script = MakeScriptObject_(this.script_, true);
+  o.body.script = this.script_;
+  o.setOption('includeSource', true);

    return o.toJSONProtocol();
  }



--~--~---------~--~----~------------~-------~--~----~
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to