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

Issue 7247013: Fix three GC unsafe places found by gcmole's dead_vars analysis. (Closed)

Created:
9 years, 6 months ago by Vyacheslav Egorov (Chromium)
Modified:
9 years, 6 months ago
CC:
v8-dev
Visibility:
Public.

Description

Fix three GC unsafe places found by gcmole's dead_vars analysis. Committed: http://code.google.com/p/v8/source/detail?r=8411

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+4 lines, -3 lines) Patch
M src/objects.cc View 3 chunks +4 lines, -3 lines 2 comments Download

Messages

Total messages: 3 (0 generated)
Vyacheslav Egorov (Chromium)
9 years, 6 months ago (2011-06-23 18:53:59 UTC) #1
Rico
Human gcmole driveby :-) http://codereview.chromium.org/7247013/diff/1/src/objects.cc File src/objects.cc (right): http://codereview.chromium.org/7247013/diff/1/src/objects.cc#newcode8445 src/objects.cc:8445: SetFastElementsCapacityAndLength(elms_length, length); Shouldn't value be ...
9 years, 6 months ago (2011-06-23 19:32:02 UTC) #2
Mads Ager (chromium)
9 years, 6 months ago (2011-06-23 19:49:30 UTC) #3
LGTM!

http://codereview.chromium.org/7247013/diff/1/src/objects.cc
File src/objects.cc (right):

http://codereview.chromium.org/7247013/diff/1/src/objects.cc#newcode8445
src/objects.cc:8445: SetFastElementsCapacityAndLength(elms_length, length);
On 2011/06/23 19:32:02, Rico wrote:
> Shouldn't value be in an handle here, SetFastElementsCapacityAndLength can
> (actually, always do) allocation. In addition, we return value several places
> below where we could potentially have had allocation in between.

SetFastElementsCapacityAndLength does allocate, but it does not cause a GC. If
there is not enough room for the object it will return a failure. In that case
we will return in the line below and retry.

Powered by Google App Engine
This is Rietveld 408576698