http://codereview.chromium.org/7031005/diff/1/src/global-handles.cc
File src/global-handles.cc (right):

http://codereview.chromium.org/7031005/diff/1/src/global-handles.cc#newcode330
src/global-handles.cc:330: Handle<Object> GlobalHandles::Create(Object*
value) {
Sorry, missed this one.

On 2011/05/16 14:55:34, Vyacheslav Egorov wrote:
On 2011/05/16 14:13:19, antonm wrote:
> I think you should reset independent flag here.

It's done by result->Initialize(value) below. Am I missing some code
path?

http://codereview.chromium.org/7031005/diff/2003/test/cctest/test-api.cc
File test/cctest/test-api.cc (right):

http://codereview.chromium.org/7031005/diff/2003/test/cctest/test-api.cc#newcode4472
test/cctest/test-api.cc:4472: obj.Dispose();
this slightly worries me.   Currently we use data read from object
itself to do some dispatches (well, maybe not in the case of WebGL
arrays, but definitely for nodes).  Now I must be careful to fetch those
data before object is collected another time.  Which is sometimes hard
to ensure.

The second point.  Actually whatever I do in weak callback, object is
already collected---I cannot revive it or pass a reference to some other
place.  Ideally, it should be enforced on API level---Vitaly had a nice
idea of passing only custom data in such a callback which solves all
this problem.

But as the very least, may you update PostGarbage... and assert that
independent global handles are disposed in weak callback (normal
callbacks may revive them).

http://codereview.chromium.org/7031005/

--
v8-dev mailing list
v8-dev@googlegroups.com
http://groups.google.com/group/v8-dev

Reply via email to