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

Issue 699343004: Parser & internalization fix: ensure no heap allocs during GetString(Handle<String>). (Closed)

Created:
6 years, 1 month ago by marja
Modified:
6 years, 1 month ago
Reviewers:
rossberg
CC:
v8-dev
Project:
v8
Visibility:
Public.

Description

Parser & internalization fix: ensure no heap allocs during GetString(Handle<String>). The bug has always been there: when the parser is operating in the "immediately internalize" mode and calls GetString, we get FlatContent of a string and then do heap allocation. The bug was uncovered by https://codereview.chromium.org/693803004/ (which put the parser to the "immediately internalize" mode more often), but looking at the code, it's possible that it can happen in other cases too. This CL makes AstValueFactory handle this situation gracefully: it won't try to internalize inside GetString(Handle<String>); it's unnecessary anyway since we have the Handle<String> already. R=rossberg@chromium.org BUG= Committed: https://code.google.com/p/v8/source/detail?r=25155

Patch Set 1 #

Total comments: 3

Patch Set 2 : . #

Unified diffs Side-by-side diffs Delta from patch set Stats (+26 lines, -11 lines) Patch
M src/ast-value-factory.h View 1 2 chunks +10 lines, -4 lines 0 comments Download
M src/ast-value-factory.cc View 1 4 chunks +16 lines, -7 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
marja
rossberg, ptal. My efficiency fixes yesterday got reverted because they uncovered this bug; after this ...
6 years, 1 month ago (2014-11-05 10:43:45 UTC) #1
rossberg
https://codereview.chromium.org/699343004/diff/1/src/ast-value-factory.cc File src/ast-value-factory.cc (left): https://codereview.chromium.org/699343004/diff/1/src/ast-value-factory.cc#oldcode235 src/ast-value-factory.cc:235: return GetOneByteString(content.ToOneByteVector()); I'm confused, what's the reason to inline ...
6 years, 1 month ago (2014-11-05 12:39:51 UTC) #2
marja
https://codereview.chromium.org/699343004/diff/1/src/ast-value-factory.cc File src/ast-value-factory.cc (left): https://codereview.chromium.org/699343004/diff/1/src/ast-value-factory.cc#oldcode235 src/ast-value-factory.cc:235: return GetOneByteString(content.ToOneByteVector()); On 2014/11/05 12:39:51, rossberg wrote: > I'm ...
6 years, 1 month ago (2014-11-05 12:41:42 UTC) #3
marja
On 2014/11/05 12:41:42, marja wrote: > https://codereview.chromium.org/699343004/diff/1/src/ast-value-factory.cc > File src/ast-value-factory.cc (left): > > https://codereview.chromium.org/699343004/diff/1/src/ast-value-factory.cc#oldcode235 > ...
6 years, 1 month ago (2014-11-05 12:44:30 UTC) #4
rossberg
https://codereview.chromium.org/699343004/diff/1/src/ast-value-factory.cc File src/ast-value-factory.cc (left): https://codereview.chromium.org/699343004/diff/1/src/ast-value-factory.cc#oldcode235 src/ast-value-factory.cc:235: return GetOneByteString(content.ToOneByteVector()); On 2014/11/05 12:41:41, marja wrote: > On ...
6 years, 1 month ago (2014-11-05 12:46:21 UTC) #5
marja
On 2014/11/05 12:46:21, rossberg wrote: > https://codereview.chromium.org/699343004/diff/1/src/ast-value-factory.cc > File src/ast-value-factory.cc (left): > > https://codereview.chromium.org/699343004/diff/1/src/ast-value-factory.cc#oldcode235 > ...
6 years, 1 month ago (2014-11-05 12:55:30 UTC) #6
rossberg
lgtm
6 years, 1 month ago (2014-11-05 13:19:48 UTC) #7
marja
6 years, 1 month ago (2014-11-05 14:00:01 UTC) #8
Message was sent while issue was closed.
Committed patchset #2 (id:20001) manually as 25155 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698