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

Issue 1758113003: bindings: Makes not call installDOMClassTemplate twice for the same interface. (Closed)

Created:
4 years, 9 months ago by Yuki
Modified:
4 years, 9 months ago
CC:
blink-reviews, blink-reviews-bindings_chromium.org, chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

bindings: Makes not call installDOMClassTemplate twice for the same interface. If the interface implements partial interfaces, the current implementation is calling V8DOMConfiguration::installDOMClassTemplate() twice (once for core/ and the other for modules/). This implementation is not intuitive, and we cannot do only-once-things in installDOMClassTemplate(). For example, we cannot call V8DOMConfiguration::setClassString() in installDOMClassTemplate(). This CL fixes so that we call initializeDOMInterfaceTemplate(), which is renamed from installDOMClassTemplate(), only once for each interface. Also separates each section/block with adding empty lines in both of the template file and generated files. BUG= Committed: https://crrev.com/3ee990d9bbf799ee4a81f843e6b1ab71d61883ba Cr-Commit-Position: refs/heads/master@{#379278}

Patch Set 1 #

Patch Set 2 : #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+576 lines, -585 lines) Patch
M third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.h View 3 chunks +5 lines, -9 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.cpp View 4 chunks +22 lines, -27 lines 3 comments Download
M third_party/WebKit/Source/bindings/templates/constants.cpp View 2 chunks +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/bindings/templates/interface_base.cpp View 1 4 chunks +81 lines, -91 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8SVGTestInterface.cpp View 1 chunk +9 lines, -11 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestException.cpp View 1 chunk +13 lines, -14 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestIntegerIndexed.cpp View 1 chunk +15 lines, -11 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestIntegerIndexedGlobal.cpp View 1 chunk +16 lines, -12 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestIntegerIndexedPrimaryGlobal.cpp View 1 chunk +16 lines, -12 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface.cpp View 1 chunk +56 lines, -47 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface2.cpp View 1 chunk +19 lines, -16 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface3.cpp View 1 chunk +20 lines, -18 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceCheckSecurity.cpp View 1 2 chunks +15 lines, -14 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceConstructor.cpp View 1 chunk +11 lines, -13 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceConstructor2.cpp View 1 chunk +11 lines, -13 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceConstructor3.cpp View 1 chunk +11 lines, -13 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceConstructor4.cpp View 1 chunk +11 lines, -13 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceCustomConstructor.cpp View 1 chunk +11 lines, -13 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceDocument.cpp View 1 chunk +9 lines, -11 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceEmpty.cpp View 1 chunk +9 lines, -11 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceEventInitConstructor.cpp View 1 chunk +13 lines, -14 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceEventTarget.cpp View 1 chunk +9 lines, -11 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceGarbageCollected.cpp View 1 chunk +16 lines, -15 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceNamedConstructor.cpp View 1 chunk +9 lines, -11 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceNamedConstructor2.cpp View 1 chunk +9 lines, -11 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceNode.cpp View 1 chunk +10 lines, -11 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceWillBeGarbageCollected.cpp View 1 chunk +13 lines, -14 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestNode.cpp View 1 chunk +12 lines, -14 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestObject.cpp View 3 chunks +47 lines, -42 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestSpecialOperations.cpp View 1 chunk +10 lines, -11 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestSpecialOperationsNotEnumerable.cpp View 1 chunk +12 lines, -11 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestTypedefs.cpp View 1 chunk +14 lines, -14 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterface5.cpp View 1 chunk +27 lines, -22 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterfacePartial.cpp View 1 chunk +12 lines, -12 lines 0 comments Download

Messages

Total messages: 11 (4 generated)
Yuki
Could you review this CL?
4 years, 9 months ago (2016-03-04 10:45:10 UTC) #2
haraken
LGTM jochen@: FYI see my comment on PS2. Don't need to review this CL :) ...
4 years, 9 months ago (2016-03-04 10:58:12 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1758113003/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1758113003/20001
4 years, 9 months ago (2016-03-04 12:37:02 UTC) #6
jochen (gone - plz use gerrit)
https://codereview.chromium.org/1758113003/diff/20001/third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.cpp File third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.cpp (right): https://codereview.chromium.org/1758113003/diff/20001/third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.cpp#newcode318 third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.cpp:318: // See also http://heycam.github.io/webidl/#es-platform-objects On 2016/03/04 at 10:58:12, haraken ...
4 years, 9 months ago (2016-03-04 12:43:17 UTC) #7
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 9 months ago (2016-03-04 13:35:23 UTC) #8
commit-bot: I haz the power
Patchset 2 (id:??) landed as https://crrev.com/3ee990d9bbf799ee4a81f843e6b1ab71d61883ba Cr-Commit-Position: refs/heads/master@{#379278}
4 years, 9 months ago (2016-03-04 13:36:27 UTC) #10
Yuki
4 years, 9 months ago (2016-03-04 14:35:40 UTC) #11
Message was sent while issue was closed.
https://codereview.chromium.org/1758113003/diff/20001/third_party/WebKit/Sour...
File third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.cpp (right):

https://codereview.chromium.org/1758113003/diff/20001/third_party/WebKit/Sour...
third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.cpp:318: // See
also http://heycam.github.io/webidl/#es-platform-objects
On 2016/03/04 12:43:17, jochen wrote:
> On 2016/03/04 at 10:58:12, haraken wrote:
> > Not related to this CL, but this is worth discussing with jochen@. This
means
> that once we set a class string on a wrapper, the wrapper is treated as a
> "modified" wrapper and thus cannot be collected by a minor GC. This means that
> once we set a class string on a wrapper, the minor GC cannot collect any
wrapper
> (because all wrappers should have the class string).
> 
> hum, that's surprising. Setting a string on the instance template shouldn't
> cause a map transition from the initial map. Have you verified that this is
what
> happens?

I just observe that, if I added
    setClassString(isolate, instanceTemplate, interfaceName);
then, fast/dom/minor-dom-gc.html failed.

How can I verify what's happening?  How can I check if actual instance objects
are marked as "modified" or not?

Powered by Google App Engine
This is Rietveld 408576698