Reviewers: Søren Gjesse, pfeldman, Description: To resolve functions from the call stack we need at least ids for the scripts of those functions. The information on the scripts is now included into the response.
Please review this at http://codereview.chromium.org/65006 SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/ Affected files: M src/mirror-delay.js Index: src/mirror-delay.js =================================================================== --- src/mirror-delay.js (revision 1687) +++ src/mirror-delay.js (working copy) @@ -1716,7 +1716,7 @@ var content = new Array(); // Add the handle for value mirrors. - if (mirror.isValue()) { + if (mirror.isValue() || mirror.isScript()) { content.push(MakeJSONPair_('handle', NumberToJSON_(mirror.handle()))); } @@ -1771,10 +1771,13 @@ break; case SCRIPT_TYPE: - // Script is represented by name and source attributes. + // Script is represented by id, name and source attributes. if (mirror.name()) { content.push(MakeJSONPair_('name', StringToJSON_(mirror.name()))); } + if (mirror.id()) { + content.push(MakeJSONPair_('id', NumberToJSON_(mirror.id()))); + } content.push(MakeJSONPair_('lineOffset', NumberToJSON_(mirror.lineOffset()))); content.push(MakeJSONPair_('columnOffset', @@ -1909,6 +1912,12 @@ content.push(MakeJSONPair_('receiver', this.serializeReference(mirror.receiver()))); content.push(MakeJSONPair_('func', this.serializeReference(mirror.func()))); + var func = mirror.func(); + if (func.script()) { + // Enforce script serialization since it's needed for the function + // resolving. + this.add_(func.script()); + } content.push(MakeJSONPair_('constructCall', BooleanToJSON_(mirror.isConstructCall()))); content.push(MakeJSONPair_('debuggerFrame', --~--~---------~--~----~------------~-------~--~----~ v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev -~----------~----~----~----~------~----~------~--~---
