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

Issue 7977001: Added ability to lock strings to prevent their representation or encoding from changing. (Closed)

Created:
9 years, 3 months ago by Lasse Reichstein
Modified:
9 years, 3 months ago
Reviewers:
Yang, Rico
CC:
v8-dev
Visibility:
Public.

Description

Added ability to lock strings to prevent their representation or encoding from changing. Use string locking to ensure consistent representation of source string during JSON parsing. Committed: http://code.google.com/p/v8/source/detail?r=9424

Patch Set 1 #

Patch Set 2 : Merge to tip of bleeding edge. #

Patch Set 3 : Merge fix #

Patch Set 4 : Tweak hash calculation #

Patch Set 5 : More tweaks. #

Total comments: 16

Patch Set 6 : Addressed review comments #

Total comments: 9

Patch Set 7 : Addressed second round of review comments. #

Patch Set 8 : Fix bug in test when running threaded. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+603 lines, -129 lines) Patch
M src/api.cc View 1 2 3 4 5 1 chunk +3 lines, -0 lines 0 comments Download
M src/handles.h View 1 2 3 4 5 6 3 chunks +22 lines, -4 lines 0 comments Download
M src/handles.cc View 1 2 3 4 5 1 chunk +16 lines, -0 lines 0 comments Download
M src/heap.h View 1 2 3 4 5 6 2 chunks +20 lines, -0 lines 0 comments Download
M src/heap.cc View 1 2 3 4 5 6 2 chunks +71 lines, -0 lines 0 comments Download
M src/json-parser.h View 1 2 3 4 5 6 18 chunks +159 lines, -90 lines 0 comments Download
M src/objects.h View 1 2 3 4 5 6 10 chunks +61 lines, -6 lines 0 comments Download
M src/objects.cc View 1 2 3 4 5 6 3 chunks +6 lines, -5 lines 0 comments Download
M src/objects-inl.h View 1 2 3 4 5 4 chunks +9 lines, -18 lines 0 comments Download
M src/runtime.cc View 1 2 3 4 5 6 1 chunk +15 lines, -6 lines 0 comments Download
M test/cctest/test-api.cc View 1 2 3 4 5 6 7 2 chunks +221 lines, -0 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
Lasse Reichstein
9 years, 3 months ago (2011-09-20 10:44:01 UTC) #1
Yang
On 2011/09/20 10:44:01, Lasse Reichstein wrote: drive-by: would it make sense to lock string encoding ...
9 years, 3 months ago (2011-09-20 11:26:37 UTC) #2
Rico
first round of comments: http://codereview.chromium.org/7977001/diff/5001/src/heap.cc File src/heap.cc (right): http://codereview.chromium.org/7977001/diff/5001/src/heap.cc#newcode2535 src/heap.cc:2535: Add a note about the ...
9 years, 3 months ago (2011-09-23 07:06:52 UTC) #3
Lasse Reichstein
http://codereview.chromium.org/7977001/diff/5001/src/heap.cc File src/heap.cc (right): http://codereview.chromium.org/7977001/diff/5001/src/heap.cc#newcode2535 src/heap.cc:2535: Done. http://codereview.chromium.org/7977001/diff/5001/src/heap.cc#newcode2546 src/heap.cc:2546: if (allocation->IsFailure()) return allocation; I don't ...
9 years, 3 months ago (2011-09-23 09:54:39 UTC) #4
Rico
9 years, 3 months ago (2011-09-26 07:25:30 UTC) #5
LGTM

http://codereview.chromium.org/7977001/diff/8002/src/handles.h
File src/handles.h (right):

http://codereview.chromium.org/7977001/diff/8002/src/handles.h#newcode384
src/handles.h:384: 
Could we have a small comment (as in a executive summary of the one in heap.h
:-)) One could easily wonder if this is a synchronization mechanism or a GC
prevent move of this string functionality

http://codereview.chromium.org/7977001/diff/8002/src/handles.h#newcode385
src/handles.h:385: void LockString(Handle<String> string);
Any reason not to have this as a private method in StringLock?

http://codereview.chromium.org/7977001/diff/8002/src/json-parser.h
File src/json-parser.h (right):

http://codereview.chromium.org/7977001/diff/8002/src/json-parser.h#newcode619
src/json-parser.h:619: 
add blank line

http://codereview.chromium.org/7977001/diff/8002/src/json-parser.h#newcode624
src/json-parser.h:624: 
add blank line

http://codereview.chromium.org/7977001/diff/8002/src/json-parser.h#newcode631
src/json-parser.h:631: 
add blank line

http://codereview.chromium.org/7977001/diff/8002/src/json-parser.h#newcode644
src/json-parser.h:644: 
add blank line

http://codereview.chromium.org/7977001/diff/8002/src/json-parser.h#newcode649
src/json-parser.h:649: 
add blank line

http://codereview.chromium.org/7977001/diff/8002/src/json-parser.h#newcode654
src/json-parser.h:654: 
add blank line

http://codereview.chromium.org/7977001/diff/8002/test/cctest/test-api.cc
File test/cctest/test-api.cc (right):

http://codereview.chromium.org/7977001/diff/8002/test/cctest/test-api.cc#newc...
test/cctest/test-api.cc:15428: // Unlock the first half again more.
remove more from comment?

Powered by Google App Engine
This is Rietveld 408576698