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

Issue 542113003: bindings: Introduces ScriptWrappable::associateWithWrapper in addition to wrap. (Closed)

Created:
6 years, 3 months ago by Yuki
Modified:
6 years, 3 months ago
Reviewers:
haraken
CC:
blink-reviews, blink-reviews-html_chromium.org, arv+blink, sof, eae+blinkwatch, abarth-chromium, blink-reviews-dom_chromium.org, dglazkov+blink, blink-reviews-bindings_chromium.org, Inactive, rwlbuis
Project:
blink
Visibility:
Public.

Description

bindings: Introduces ScriptWrappable::associateWithWrapper in addition to wrap. generate_constructor_wrapper macro in bindings/templates/methods.cpp https://code.google.com/p/chromium/codesearch#chromium/src/third_party/WebKit/Source/bindings/templates/methods.cpp&q=%22macro%20generate_constructor_wrapper%22%20file:methods.cpp&sq=package:chromium&l=611 would like to reuse the existing wrapper object, and in that case, it needs to associate the impl with the existing wrapper. (Note that wrap method creates a new wrapper.) This CL introduces ScriptWrappable::associateWithWrapper to allow it. This method does not need to be virtual because it must be called from only a) wrap method, or b) V8T::constructorCallback, where we already know the right WrapperTypeInfo. BUG=235436 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=181548

Patch Set 1 #

Total comments: 6

Patch Set 2 : Synced. #

Patch Set 3 : Addressed review comments. #

Patch Set 4 : #

Total comments: 5
Unified diffs Side-by-side diffs Delta from patch set Stats (+74 lines, -31 lines) Patch
M Source/bindings/core/v8/ScriptWrappable.h View 1 2 1 chunk +3 lines, -0 lines 3 comments Download
M Source/bindings/core/v8/ScriptWrappable.cpp View 1 chunk +5 lines, -0 lines 0 comments Download
M Source/bindings/templates/methods.cpp View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceConstructor.cpp View 1 2 3 7 chunks +7 lines, -7 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceConstructor2.cpp View 1 2 3 4 chunks +4 lines, -4 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceConstructor3.cpp View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceConstructor4.cpp View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceEventTarget.cpp View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceGarbageCollected.cpp View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceNamedConstructor.cpp View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceNamedConstructor2.cpp View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceWillBeGarbageCollected.cpp View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M Source/bindings/tests/results/V8TestNode.cpp View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestTypedefs.cpp View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M Source/core/dom/Document.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/dom/Document.cpp View 1 1 chunk +5 lines, -2 lines 2 comments Download
M Source/core/dom/Node.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/dom/Node.cpp View 1 1 chunk +5 lines, -0 lines 0 comments Download
M Source/core/events/MessageEvent.h View 1 2 2 chunks +3 lines, -0 lines 0 comments Download
M Source/core/events/MessageEvent.cpp View 1 1 chunk +10 lines, -0 lines 0 comments Download
M Source/core/events/MessageEvent.idl View 1 chunk +0 lines, -3 lines 0 comments Download
M Source/core/html/ImageData.h View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
M Source/core/html/ImageData.cpp View 1 1 chunk +11 lines, -0 lines 0 comments Download
M Source/core/html/ImageData.idl View 1 chunk +0 lines, -3 lines 0 comments Download

Messages

Total messages: 10 (2 generated)
Yuki
Could you review this CL?
6 years, 3 months ago (2014-09-05 12:04:34 UTC) #2
haraken
> This CL introduces ScriptWrappable::associateWithWrapper to allow it. > This method does not need to ...
6 years, 3 months ago (2014-09-05 16:41:39 UTC) #3
Yuki
As discussed offline, I made associateWithWrapper a virtual method. We still have several [Custom=Wrap]: CSSRule, ...
6 years, 3 months ago (2014-09-08 07:56:05 UTC) #4
haraken
LGTM https://codereview.chromium.org/542113003/diff/60001/Source/bindings/core/v8/ScriptWrappable.h File Source/bindings/core/v8/ScriptWrappable.h (right): https://codereview.chromium.org/542113003/diff/60001/Source/bindings/core/v8/ScriptWrappable.h#newcode123 Source/bindings/core/v8/ScriptWrappable.h:123: // Associates the instance with the existing wrapper. ...
6 years, 3 months ago (2014-09-08 08:48:45 UTC) #5
Yuki
https://codereview.chromium.org/542113003/diff/60001/Source/bindings/core/v8/ScriptWrappable.h File Source/bindings/core/v8/ScriptWrappable.h (right): https://codereview.chromium.org/542113003/diff/60001/Source/bindings/core/v8/ScriptWrappable.h#newcode123 Source/bindings/core/v8/ScriptWrappable.h:123: // Associates the instance with the existing wrapper. Returns ...
6 years, 3 months ago (2014-09-08 09:00:22 UTC) #6
haraken
https://codereview.chromium.org/542113003/diff/60001/Source/bindings/core/v8/ScriptWrappable.h File Source/bindings/core/v8/ScriptWrappable.h (right): https://codereview.chromium.org/542113003/diff/60001/Source/bindings/core/v8/ScriptWrappable.h#newcode123 Source/bindings/core/v8/ScriptWrappable.h:123: // Associates the instance with the existing wrapper. Returns ...
6 years, 3 months ago (2014-09-08 09:07:23 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/yukishiino@chromium.org/542113003/60001
6 years, 3 months ago (2014-09-08 09:12:38 UTC) #9
commit-bot: I haz the power
6 years, 3 months ago (2014-09-08 09:17:48 UTC) #10
Message was sent while issue was closed.
Committed patchset #4 (id:60001) as 181548

Powered by Google App Engine
This is Rietveld 408576698