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

Issue 2873543002: First implementation of lazily cached accessor for DOM attributes. (Closed)

Created:
3 years, 7 months ago by nverne
Modified:
3 years, 7 months ago
Reviewers:
haraken, slangley, sashab, peria, Yuki
CC:
blink-reviews, blink-reviews-bindings_chromium.org, blink-reviews-dom_chromium.org, blink-reviews-html_chromium.org, chasej+watch_chromium.org, chromium-reviews, dglazkov+blink, eae+blinkwatch, iclelland+watch_chromuim.org, kinuko+watch, rwlbuis, sof
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

First implementation of lazily cached accessor for DOM attributes. We use a generated callback to populate private property in the object on first access in v8. The generated callback is also used when setting a new value for the property. The CachedAccessor = Lazy tag is used (currently) for HTMLElement.title, HTMLElement.lang and Element.id. This is just as a proof of concept. More attributes could be converted. BUG=chromium:667237

Patch Set 1 #

Total comments: 17

Patch Set 2 : whitespace and renaming fixes #

Unified diffs Side-by-side diffs Delta from patch set Stats (+858 lines, -321 lines) Patch
M third_party/WebKit/Source/bindings/IDLExtendedAttributes.md View 2 chunks +6 lines, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/IDLExtendedAttributes.txt View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.h View 3 chunks +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.cpp View 7 chunks +24 lines, -10 lines 0 comments Download
M third_party/WebKit/Source/bindings/scripts/v8_attributes.py View 2 chunks +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/bindings/templates/attributes.cpp.tmpl View 1 6 chunks +78 lines, -9 lines 0 comments Download
M third_party/WebKit/Source/bindings/templates/interface.cpp.tmpl View 1 2 chunks +3 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/bindings/templates/interface_base.cpp.tmpl View 8 chunks +21 lines, -9 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8SVGTestInterface.cpp View 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestCallbackFunctions.cpp View 1 chunk +8 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestException.cpp View 1 chunk +5 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestIntegerIndexed.cpp View 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestIntegerIndexedGlobal.cpp View 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestIntegerIndexedPrimaryGlobal.cpp View 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface.cpp View 15 chunks +105 lines, -53 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface2.cpp View 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface3.cpp View 1 chunk +5 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceCheckSecurity.cpp View 2 chunks +20 lines, -10 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceDocument.cpp View 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceEventInitConstructor.cpp View 1 chunk +5 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceGarbageCollected.cpp View 1 chunk +5 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceNamedConstructor.cpp View 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceNode.cpp View 1 chunk +22 lines, -8 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceOriginTrialEnabled.cpp View 2 chunks +8 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceSecureContext.cpp View 6 chunks +6 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestNode.cpp View 1 chunk +11 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestObject.cpp View 4 chunks +463 lines, -160 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestTypedefs.cpp View 1 chunk +7 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterface5.cpp View 2 chunks +27 lines, -11 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterfacePartial.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Element.idl View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/html/HTMLElement.idl View 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/platform/bindings/V8PrivateProperty.h View 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 10 (4 generated)
nverne
This isn't ready to submit until the related v8 cl is accepted. I'm sending this ...
3 years, 7 months ago (2017-05-09 02:11:24 UTC) #3
haraken
+yukishiino for the usage of private properties.
3 years, 7 months ago (2017-05-09 02:27:43 UTC) #5
Yuki
Overall l-g-t-m, but I'm wondering the following two points. a) Can we make the lazy ...
3 years, 7 months ago (2017-05-09 06:06:31 UTC) #6
nverne
I'm getting pushback from v8 team about using the cache_init_callback at all. This CL may ...
3 years, 7 months ago (2017-05-10 02:11:49 UTC) #7
peria
Could you split the refactoring in templates to another CL? The refactoring is great, but ...
3 years, 7 months ago (2017-05-10 02:21:53 UTC) #9
nverne
3 years, 7 months ago (2017-05-23 05:51:37 UTC) #10
On 2017/05/10 at 02:21:53, peria wrote:
> Could you split the refactoring in templates to another CL?
> The refactoring is great, but most changes in it are
> not critical for the issue you're addressing.

I'm closing this issue for now, because the v8 companion of this issue is no
longer implemented in terms of a cache_init_callback.

Powered by Google App Engine
This is Rietveld 408576698