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

Issue 113399: Use JSON.stringify to serialize debugger messages (Closed)

Created:
11 years, 7 months ago by yurys
Modified:
9 years, 7 months ago
CC:
v8-dev
Visibility:
Public.

Description

MirrorSerializer now converts mirrors to plain JS objects. This objects are serialized to json string using JSON.stringify. Committed: http://code.google.com/p/v8/source/detail?r=1957

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 18

Patch Set 3 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+211 lines, -357 lines) Patch
M src/debug-delay.js View 1 2 5 chunks +81 lines, -100 lines 0 comments Download
M src/mirror-delay.js View 1 2 10 chunks +96 lines, -228 lines 0 comments Download
M test/mjsunit/mirror-array.js View 1 2 1 chunk +3 lines, -2 lines 0 comments Download
M test/mjsunit/mirror-boolean.js View 1 2 1 chunk +1 line, -1 line 0 comments Download
M test/mjsunit/mirror-date.js View 1 2 3 chunks +9 lines, -9 lines 0 comments Download
M test/mjsunit/mirror-error.js View 1 2 1 chunk +3 lines, -2 lines 0 comments Download
M test/mjsunit/mirror-function.js View 1 2 1 chunk +3 lines, -2 lines 0 comments Download
M test/mjsunit/mirror-null.js View 1 2 1 chunk +1 line, -1 line 0 comments Download
M test/mjsunit/mirror-number.js View 1 2 1 chunk +1 line, -1 line 0 comments Download
M test/mjsunit/mirror-object.js View 1 2 3 chunks +4 lines, -4 lines 0 comments Download
M test/mjsunit/mirror-regexp.js View 1 2 1 chunk +3 lines, -2 lines 0 comments Download
M test/mjsunit/mirror-script.js View 1 2 1 chunk +1 line, -1 line 0 comments Download
M test/mjsunit/mirror-string.js View 1 2 1 chunk +1 line, -1 line 0 comments Download
M test/mjsunit/mirror-undefined.js View 1 2 1 chunk +1 line, -1 line 0 comments Download
M test/mjsunit/mirror-unresolved-function.js View 1 2 1 chunk +3 lines, -2 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
yurys
11 years, 7 months ago (2009-05-14 14:56:11 UTC) #1
Søren Thygesen Gjesse
LGTM Thank you for cleaning this up - it looks much better now. http://codereview.chromium.org/113399/diff/34/49 File ...
11 years, 7 months ago (2009-05-14 21:10:27 UTC) #2
yurys
11 years, 7 months ago (2009-05-15 07:26:11 UTC) #3
There is a comment at the top of mirror-delay.js that I think can be removed
along with the two lines of code. Can you confirm that?


// Touch the RegExp and Date functions to make sure that date-delay.js and
// regexp-delay.js has been loaded. This is required as the mirrors use
// functions within these files through the builtins object.
RegExp;
Date;

http://codereview.chromium.org/113399/diff/34/49
File src/debug-delay.js (right):

http://codereview.chromium.org/113399/diff/34/49#newcode1808
Line 1808: * @return {Object} JSON formatted object value
On 2009/05/14 21:10:27, Søren Gjesse wrote:
> Returns object - not JSON formatted.

Done.

http://codereview.chromium.org/113399/diff/34/49#newcode1810
Line 1810: function SimpleObjectToJSON_(object, mirror_serializer) {
On 2009/05/14 21:10:27, Søren Gjesse wrote:
> I think this function should not have JSON in it's name as it does not return
> JSON but an object. How about SimpleObjectToProtocolObject?

Done.

http://codereview.chromium.org/113399/diff/34/49#newcode1835
Line 1835: * @return {Array} JSON formatted array value
On 2009/05/14 21:10:27, Søren Gjesse wrote:
> Returns array - not JSON formatted.

Done.

http://codereview.chromium.org/113399/diff/34/49#newcode1837
Line 1837: function SimpleArrayToJSON_(array, mirror_serializer) {
On 2009/05/14 21:10:27, Søren Gjesse wrote:
> No JSON in name (as above).

Done.

http://codereview.chromium.org/113399/diff/34/49#newcode1852
Line 1852: * @return {*} JSON formatted value
On 2009/05/14 21:10:27, Søren Gjesse wrote:
> Return value is not JSON formatted.

Done.

http://codereview.chromium.org/113399/diff/34/49#newcode1854
Line 1854: function SimpleValueToJSON_(value, mirror_serializer) {
On 2009/05/14 21:10:27, Søren Gjesse wrote:
> No JSON in name (as above).

Done.

http://codereview.chromium.org/113399/diff/34/48
File src/mirror-delay.js (right):

http://codereview.chromium.org/113399/diff/34/48#newcode1734
Line 1734: */
On 2009/05/14 21:10:27, Søren Gjesse wrote:
> Return value is an object.

Done.

http://codereview.chromium.org/113399/diff/34/48#newcode1962
Line 1962: * @returns {String} JSON serialization
On 2009/05/14 21:10:27, Søren Gjesse wrote:
> Return value is not string.

Done.

http://codereview.chromium.org/113399/diff/34/48#newcode2031
Line 2031: * @returns {String} JSON value
On 2009/05/14 21:10:27, Søren Gjesse wrote:
> Return value is not always a string.

Done.

Powered by Google App Engine
This is Rietveld 408576698