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

Issue 149304: Fix unsafe use of DescriptorWriter across allocation.... (Closed)

Created:
11 years, 5 months ago by Mads Ager (chromium)
Modified:
9 years, 7 months ago
Reviewers:
iposva, Kasper Lund
CC:
v8-dev
Visibility:
Public.

Description

Fix unsafe use of DescriptorWriter across allocation. DescriptorWriters hold a raw pointer to the descriptor array and they are therefore not GC safe. Committed: http://code.google.com/p/v8/source/detail?r=2384

Patch Set 1 #

Total comments: 4

Patch Set 2 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+11 lines, -6 lines) Patch
M src/factory.cc View 1 2 chunks +11 lines, -6 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Mads Ager (chromium)
11 years, 5 months ago (2009-07-08 01:01:53 UTC) #1
iposva
LGTM with comments. -Ivan http://codereview.chromium.org/149304/diff/1/2 File src/factory.cc (right): http://codereview.chromium.org/149304/diff/1/2#newcode573 Line 573: DescriptorWriter w(*result); Please put ...
11 years, 5 months ago (2009-07-08 02:12:21 UTC) #2
Mads Ager (chromium)
11 years, 5 months ago (2009-07-08 03:20:44 UTC) #3
I'll put this change back now to get rid of the unsafe use of the
DescriptorWriter.  As we discussed offline, I'll experiment with removing the
DescriptorStreams entirely.

http://codereview.chromium.org/149304/diff/1/2
File src/factory.cc (right):

http://codereview.chromium.org/149304/diff/1/2#newcode573
Line 573: DescriptorWriter w(*result);
On 2009/07/08 02:12:21, iposva wrote:
> Please put a scope around this with a comment that a DescriptorWriter can be
> safely used here because copying entries does not cause a GC.

Done.

http://codereview.chromium.org/149304/diff/1/2#newcode597
Line 597: // Do not use the DescriptorWriter 'w' here. SymbolFromString
On 2009/07/08 02:12:21, iposva wrote:
> At which point you can skip the reference to w in this comment and instead
just
> say that SymbolFromString can cause allocation which is why we need to use
> handle based accesses to the result array.

Done.

Powered by Google App Engine
This is Rietveld 408576698