DescriptionForbid creating new wrapper from SetWrapperReferenceTo
SetWrapperReferenceTo IDL attribute is a hack to use V8 wrapper reference
to avoid reference cycles in Blink. The |visitDOMWrapper| callback is
used to create a temporary strong reference between the wrappers in GC
prologue.
Before this patch, |visitDOMWrapper| was allowed to create a new wrapper
if the wrapper for target object didn't exist. However this is dangerous,
as the target object may be already destructed. The target wrapper must
already exist for this reference hack to work correctly.
This patch forbids creating a new wrapper from |visitDOMWrapper| callback,
and adds an ASSERT that checks that the target object wrapper already
exists.
BUG=None
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=175998
Patch Set 1 #
Messages
Total messages: 7 (0 generated)
|