Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8)

Issue 332643003: Forbid creating new wrapper from SetWrapperReferenceTo (Closed)

Created:
6 years, 6 months ago by kouhei (in TOK)
Modified:
6 years, 6 months ago
CC:
blink-reviews, blink-reviews-bindings_chromium.org, arv+blink, abarth-chromium
Project:
blink
Visibility:
Public.

Description

Forbid 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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+2 lines, -4 lines) Patch
M Source/bindings/templates/interface.cpp View 1 chunk +1 line, -2 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterface.cpp View 1 chunk +1 line, -2 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
kouhei (in TOK)
6 years, 6 months ago (2014-06-12 03:05:27 UTC) #1
Nils Barth (inactive)
LGTM; haraken?
6 years, 6 months ago (2014-06-12 03:10:03 UTC) #2
haraken
LGTM
6 years, 6 months ago (2014-06-12 03:48:30 UTC) #3
kouhei (in TOK)
The CQ bit was checked by kouhei@chromium.org
6 years, 6 months ago (2014-06-12 03:49:34 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kouhei@chromium.org/332643003/1
6 years, 6 months ago (2014-06-12 03:50:16 UTC) #5
commit-bot: I haz the power
Change committed as 175998
6 years, 6 months ago (2014-06-12 06:24:39 UTC) #6
kouhei (in TOK)
6 years, 6 months ago (2014-06-17 03:48:42 UTC) #7
Message was sent while issue was closed.
A revert of this CL has been created in
https://codereview.chromium.org/332183008/ by kouhei@chromium.org.

The reason for reverting is: There seems to be an exiting bug which hits this
callpath. Reverting the change until the bug is fixed..

Powered by Google App Engine
This is Rietveld 408576698