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

Issue 27627006: Always make a copy of a string when adding it to StringsStorage (Closed)

Created:
7 years, 2 months ago by yurys
Modified:
7 years, 2 months ago
Reviewers:
Sven Panne, alph, loislo
CC:
v8-dev
Visibility:
Public.

Description

Always make a copy of a string when adding it to StringsStorage Otherwise the string passed as const char* may be disposed and we will end up with a dangling pointer. Also changed StringsStorage::GetCopy so that a copy is not created if the string is already in the cache. BUG=None R=alph@chromium.org, svenpanne@chromium.org Committed: https://code.google.com/p/v8/source/detail?r=17260

Patch Set 1 #

Total comments: 2

Patch Set 2 : Added empty line #

Unified diffs Side-by-side diffs Delta from patch set Stats (+54 lines, -37 lines) Patch
M src/profile-generator.h View 1 chunk +6 lines, -8 lines 0 comments Download
M src/profile-generator.cc View 1 7 chunks +48 lines, -19 lines 0 comments Download
M src/profile-generator-inl.h View 1 chunk +0 lines, -10 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
yurys
There is at least one case when the string stored in the storage will be ...
7 years, 2 months ago (2013-10-17 11:46:48 UTC) #1
alph
lgtm https://codereview.chromium.org/27627006/diff/1/src/profile-generator.cc File src/profile-generator.cc (right): https://codereview.chromium.org/27627006/diff/1/src/profile-generator.cc#newcode47 src/profile-generator.cc:47: nit: add extra lines around the function.
7 years, 2 months ago (2013-10-17 12:19:09 UTC) #2
yurys
https://codereview.chromium.org/27627006/diff/1/src/profile-generator.cc File src/profile-generator.cc (right): https://codereview.chromium.org/27627006/diff/1/src/profile-generator.cc#newcode47 src/profile-generator.cc:47: On 2013/10/17 12:19:09, alph wrote: > nit: add extra ...
7 years, 2 months ago (2013-10-17 12:56:41 UTC) #3
yurys
@svenpanne: need OWNER's approval
7 years, 2 months ago (2013-10-18 08:07:47 UTC) #4
Sven Panne
LGTM (rubber-stamped)
7 years, 2 months ago (2013-10-18 08:38:53 UTC) #5
yurys
7 years, 2 months ago (2013-10-18 08:56:23 UTC) #6
Message was sent while issue was closed.
Committed patchset #2 manually as r17260 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698