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

Issue 3398014: Fix possible evaluation order problems. (Closed)

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

Description

Fix possible evaluation order problems. We should not allow handle dereference and GC inside the same expression because order of subexpression evalution are not defined. Committed: http://code.google.com/p/v8/source/detail?r=5509

Patch Set 1 #

Total comments: 1

Patch Set 2 : fixed more places #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+147 lines, -47 lines) Patch
M src/api.cc View 7 chunks +64 lines, -16 lines 3 comments Download
M src/bootstrapper.cc View 1 chunk +7 lines, -1 line 1 comment Download
M src/compilation-cache.cc View 6 chunks +42 lines, -7 lines 0 comments Download
M src/compiler.cc View 2 chunks +8 lines, -5 lines 0 comments Download
M src/handles.cc View 1 chunk +2 lines, -1 line 0 comments Download
M src/objects.cc View 1 chunk +4 lines, -4 lines 0 comments Download
M src/runtime.cc View 1 7 chunks +20 lines, -13 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Vyacheslav Egorov (Chromium)
10 years, 3 months ago (2010-09-21 16:29:50 UTC) #1
Vitaly Repeshko
Drive by question. http://codereview.chromium.org/3398014/diff/3001/4001 File src/api.cc (right): http://codereview.chromium.org/3398014/diff/3001/4001#newcode774 src/api.cc:774: i::Handle<i::Object> proxy = FromCData(value); Isn't it ...
10 years, 3 months ago (2010-09-21 21:19:54 UTC) #2
Erik Corry
10 years, 3 months ago (2010-09-23 07:53:28 UTC) #3
LGTM

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

http://codereview.chromium.org/3398014/diff/1/2#newcode1420
src/bootstrapper.cc:1420: } while (false);
This semicolon should not be there.

http://codereview.chromium.org/3398014/diff/3001/4001
File src/api.cc (right):

http://codereview.chromium.org/3398014/diff/3001/4001#newcode771
src/api.cc:771: static void SetFieldWrapped(void  (T::*setter) (i::Object*,
i::WriteBarrierMode),
This doesn't lint, but presumably removing the double space would fix that.

http://codereview.chromium.org/3398014/diff/3001/4001#newcode775
src/api.cc:775: ((*a)->*setter)(*proxy, i::UPDATE_WRITE_BARRIER);
I don't like pointer-to-method, and I don't like having to write the full name
of the method at the use points.


A macro SET_FIELD_WRAPPED(obj, function, value) would work better here.

http://codereview.chromium.org/3398014/diff/3001/4002
File src/bootstrapper.cc (right):

http://codereview.chromium.org/3398014/diff/3001/4002#newcode1420
src/bootstrapper.cc:1420: } while (false);
You need to lose the semicolon here.

Powered by Google App Engine
This is Rietveld 408576698