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

Issue 18092: Added handles to the mirror objects. When a mirror for an object is created... (Closed)

Created:
11 years, 11 months ago by Søren Thygesen Gjesse
Modified:
9 years, 7 months ago
CC:
v8-dev
Visibility:
Public.

Description

Added handles to the mirror objects. When a mirror for an object is created it is assigned a numeric handle. Handles are used to make a 1:1 correspondence between objects and mirrors. Currently the mirrors are cached in a JavaScript array and when creating a mirror this cache is checked to see if a mirror already exists for the object. This cache is cleared when leaving the debugger. Changed the serialization format to take advantage of these handles. When an object is serialized referenced objects are represented just by their handle id serialized as '{ref:<handle>}'. During serialization the referenced handles are collected and the serializer can provide a serialization of all the referenced objects. Removed the special handling of array properties. Indexed properties and the length property are now rendered as named properties in the serialization. Removed the special serialization handling of RegExp properties. The properties 'source', 'global', 'ignoreCase' and 'multiline' are serialized with the rest of the properties. Changed a lot of tests to handle the changed format. Committed: http://code.google.com/p/v8/source/detail?r=1093

Patch Set 1 #

Total comments: 6

Patch Set 2 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+641 lines, -285 lines) Patch
M src/debug.h View 1 chunk +3 lines, -0 lines 0 comments Download
M src/debug.cc View 2 chunks +19 lines, -0 lines 0 comments Download
M src/debug-delay.js View 5 chunks +20 lines, -13 lines 0 comments Download
M src/mirror-delay.js View 1 19 chunks +266 lines, -120 lines 0 comments Download
M test/mjsunit/debug-backtrace.js View 5 chunks +66 lines, -33 lines 0 comments Download
M test/mjsunit/mirror-array.js View 2 chunks +59 lines, -31 lines 0 comments Download
M test/mjsunit/mirror-boolean.js View 1 chunk +2 lines, -1 line 0 comments Download
M test/mjsunit/mirror-date.js View 1 chunk +2 lines, -1 line 0 comments Download
M test/mjsunit/mirror-error.js View 2 chunks +27 lines, -2 lines 0 comments Download
M test/mjsunit/mirror-function.js View 2 chunks +17 lines, -3 lines 0 comments Download
M test/mjsunit/mirror-null.js View 1 chunk +2 lines, -1 line 0 comments Download
M test/mjsunit/mirror-number.js View 1 chunk +2 lines, -1 line 0 comments Download
M test/mjsunit/mirror-object.js View 3 chunks +71 lines, -47 lines 0 comments Download
M test/mjsunit/mirror-regexp.js View 3 chunks +27 lines, -12 lines 0 comments Download
M test/mjsunit/mirror-script.js View 1 chunk +2 lines, -2 lines 0 comments Download
M test/mjsunit/mirror-string.js View 1 chunk +2 lines, -1 line 0 comments Download
M test/mjsunit/mirror-undefined.js View 1 chunk +2 lines, -1 line 0 comments Download
M test/mjsunit/mirror-unresolved-function.js View 2 chunks +25 lines, -8 lines 0 comments Download
M test/mjsunit/regress/regress-1081309.js View 2 chunks +27 lines, -8 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Søren Thygesen Gjesse
11 years, 11 months ago (2009-01-15 12:32:44 UTC) #1
Mads Ager (chromium)
LGTM http://codereview.chromium.org/18092/diff/1/18 File src/mirror-delay.js (right): http://codereview.chromium.org/18092/diff/1/18#newcode93 Line 93: * Returns the mirror for the undifined ...
11 years, 11 months ago (2009-01-15 18:52:06 UTC) #2
Søren Thygesen Gjesse
11 years, 11 months ago (2009-01-16 10:38:36 UTC) #3
http://codereview.chromium.org/18092/diff/1/18
File src/mirror-delay.js (right):

http://codereview.chromium.org/18092/diff/1/18#newcode93
Line 93: * Returns the mirror for the undifined value.
On 2009/01/15 18:52:06, Mads Ager wrote:
> undifined -> undefined.

Done.

http://codereview.chromium.org/18092/diff/1/18#newcode1657
Line 1657: JSONProtocolSerializer.prototype.serialize_ = function(mirror,
reference, details) {
On 2009/01/15 18:52:06, Mads Ager wrote:
> line too long?

Done.

http://codereview.chromium.org/18092/diff/1/18#newcode1758
Line 1758: JSONProtocolSerializer.prototype.serializeObject_ = function(mirror,
content, details) {
On 2009/01/15 18:52:06, Mads Ager wrote:
> Line too long?

Done.

Powered by Google App Engine
This is Rietveld 408576698