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

Issue 6463001: Use GC-safe version when setting elements. (Closed)

Created:
9 years, 10 months ago by antonm
Modified:
9 years, 4 months ago
CC:
v8-dev
Visibility:
Public.

Description

Use GC-safe version when setting elements. BUG=1125 TEST=test/mjsunit/regress/regress-1125.js Committed: http://code.google.com/p/v8/source/detail?r=6693

Patch Set 1 #

Total comments: 2

Patch Set 2 : Minor improvements and comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+51 lines, -5 lines) Patch
M src/runtime.cc View 1 2 chunks +10 lines, -5 lines 0 comments Download
A test/mjsunit/regress/regress-1125.js View 1 chunk +41 lines, -0 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
antonm
Mads, may you have a look?
9 years, 10 months ago (2011-02-08 20:46:22 UTC) #1
Mads Ager (chromium)
LGTM! http://codereview.chromium.org/6463001/diff/1/src/runtime.cc File src/runtime.cc (right): http://codereview.chromium.org/6463001/diff/1/src/runtime.cc#newcode7394 src/runtime.cc:7394: Handle<Context>::cast(holder)->set(index, *value); Do you know that this one ...
9 years, 10 months ago (2011-02-09 07:03:36 UTC) #2
antonm
9 years, 10 months ago (2011-02-09 11:38:09 UTC) #3
http://codereview.chromium.org/6463001/diff/1/src/runtime.cc
File src/runtime.cc (right):

http://codereview.chromium.org/6463001/diff/1/src/runtime.cc#newcode7394
src/runtime.cc:7394: Handle<Context>::cast(holder)->set(index, *value);
Agree, but in this case I am afraid we cannot use SetElement as a context is a
fixed array actually.  Good news is set should be GC safe.  I slightly reworked
this line (to have lesser mixture of handles and non-handles stuff) and added a
comment explaining why it's safe.

On 2011/02/09 07:03:36, Mads Ager wrote:
> Do you know that this one cannot fail? Code that is a handle non-handle mix is
> always scary. Let's do this one in a GC safe way as well.

Powered by Google App Engine
This is Rietveld 408576698