More handlification comments...

https://codereview.chromium.org/329253004/diff/50001/src/objects.cc
File src/objects.cc (right):

https://codereview.chromium.org/329253004/diff/50001/src/objects.cc#newcode16436
src/objects.cc:16436: bool OrderedHashTableIterator<Derived,
TableType>::HasMore(
On second reading, does HasMore() ever do allocation? Perhaps it could
be made an instance method too...though you might want to wait to see if
mstarzinger has an opinion before doing that.

https://codereview.chromium.org/329253004/diff/50001/src/objects.cc#newcode16444
src/objects.cc:16444: iterator->Transition();
This is the only bit that suggests that HasMore uses handles, since
Transition() uses Handles internally. But looking at the implementation
of Transition() I think that might be bogus, too (Handles in an instance
method are always scary-looking, since if the Handles are actually
needed to protect against GC, |this| could become invalid).

https://codereview.chromium.org/329253004/diff/50001/src/runtime.cc
File src/runtime.cc (right):

https://codereview.chromium.org/329253004/diff/50001/src/runtime.cc#newcode1616
src/runtime.cc:1616: CONVERT_ARG_HANDLE_CHECKED(JSSetIterator, holder,
0);
This should just be CONVERT_ARG_CHECKED() (no "HANDLE") now.

https://codereview.chromium.org/329253004/diff/50001/src/runtime.cc#newcode1745
src/runtime.cc:1745: CONVERT_ARG_HANDLE_CHECKED(JSMapIterator, holder,
0);
ditto, and lots more below.

Basically, SealHandleScope should be paired with CONVERT_ARG_CHECKED(),
while HandleScope should be paired with CONVERT_ARG_HANDLE_CHECKED().
Similarly, if your Runtime function uses Handles at all, it should have
a HandleScope, not a SealHandleScope.

V8 folks, please correct me if I'm providing poor advice here. My
understanding is that V8's not abandoning raw pointers altogether, only
in those cases that previously required MaybeObjects.

https://codereview.chromium.org/329253004/

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to