Overall lgtm.

The state NEAR_DEATH has become misleading since it is now also used after  
an
object is dead.  Maybe we should find a better name.

When doing the callback in PostGarbageCollectionProcessing are we passing a
stale object pointer to the callback?  If so we should use an empty handle  
for
really weak handles instead.


http://codereview.chromium.org/260017/diff/2006/2007
File include/v8.h (right):

http://codereview.chromium.org/260017/diff/2006/2007#newcode399
Line 399: inline void MakeReallyWeak(void* parameters,
WeakReferenceCallback callback);
I think we need to find a more informative name.  Alternatively we could
use MakeWeak for both and use a parameter to control when the callback
is issued.

http://codereview.chromium.org/260017/diff/2006/2009
File src/global-handles.cc (right):

http://codereview.chromium.org/260017/diff/2006/2009#newcode96
Line 96: void MakeWeak(void* parameter, WeakReferenceCallback callback,
The 'callback' parameter should be moved to the next line as well.

http://codereview.chromium.org/260017/diff/2006/2009#newcode115
Line 115: ASSERT(!IsNearDeath() || !really_weak_);
Are we sure this can't happen?  Wouldn't it be safer to just ignore it
in that case, rather than ASSERT?

http://codereview.chromium.org/260017/diff/2006/2009#newcode410
Line 410: for (int i = 0; i < object_groups->length(); ++i) {
Changing from i++ to ++i shouldn't make any difference -- I'd prefer to
keep the i++ for consistency.

http://codereview.chromium.org/260017/diff/2006/2011
File test/cctest/test-api.cc (right):

http://codereview.chromium.org/260017/diff/2006/2011#newcode2963
Line 2963: CHECK(false);
UNREACHABLE()?

http://codereview.chromium.org/260017/diff/2006/2011#newcode2981
Line 2981: const Mode mode_;
Why const?

http://codereview.chromium.org/260017

--~--~---------~--~----~------------~-------~--~----~
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to