I am worried that we could accidentally dereference the handles from the other
thread and it would work most of the time and occasionally crash.  I would
suggest that in debug mode we could 'pickle' the object pointers in the arrays by flipping a bit. Then they will cause a crash if they are accessed. On GC they need to be unpickled and repickled and of course when we are back on the
main thread we need to unpickle them.


http://codereview.chromium.org/10640012/diff/2001/src/api.cc
File src/api.cc (right):

http://codereview.chromium.org/10640012/diff/2001/src/api.cc#newcode6376
src/api.cc:6376: template<bool HasCompilationBlock>
This should be named_like_this, but I wonder whether this templatization
is worth it.  Do you have benchmark runs showing that just testing
last_block_before_compilation_ is too slow?

http://codereview.chromium.org/10640012/diff/2001/src/api.cc#newcode6453
src/api.cc:6453: // ASSERT this.
ASSERT -> Assert
(in the comment)

http://codereview.chromium.org/10640012/diff/2001/src/api.cc#newcode6476
src/api.cc:6476: if (extension->next) {
We don't allow implicit conversions to bool.

http://codereview.chromium.org/10640012/diff/2001/src/api.cc#newcode6479
src/api.cc:6479: if (extension->previous) {
and here

http://codereview.chromium.org/10640012/diff/2001/src/api.h
File src/api.h (right):

http://codereview.chromium.org/10640012/diff/2001/src/api.h#newcode415
src/api.h:415: hidden_extensions_head_(NULL) { }
Instead of 'hidden' may I suggest 'persistent'.  That is what we have
used other places where we have non-stack based handles that do not have
a scope based lifetime.

http://codereview.chromium.org/10640012/diff/2001/src/compiler.h
File src/compiler.h (right):

http://codereview.chromium.org/10640012/diff/2001/src/compiler.h#newcode178
src/compiler.h:178: void RememberHiddenExtensions(
Could be called StorePersistentExtensions.

http://codereview.chromium.org/10640012/

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

Reply via email to