|
Add [CachedAccessor] attribute to cache (almost) constant accessors.
Calls to getter are translated into a cheap property load, eliminating the calling overhead. Other potential benefits could also apply, like inlining and/or constant propagation.
Currently the 'document' DOM accessor is implemented as a plain data property for performance reasons, with the downside of violating the spec. This produces exactly the same (performant) code as the current hack while being spec-compliant.
The following JS code is now valid:
var acc = Object.getOwnPropertyDescriptor(window, "document");
var d = acc.get.call(window);
To invalidate/update (e.g. window.document) just use:
V8PrivateProperty::getWindowDocument().set(context, window, newDocumentWrapper);
BUG= chromium:634276
Intent to Implement and Ship:
https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/OhIFnre7ytQ
Specialize GlobalProxy access:
https://codereview.chromium.org/2369933005
Total comments: 27
Total comments: 16
Total comments: 13
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+383 lines, -305 lines) |
Patch |
 |
M |
third_party/WebKit/Source/bindings/IDLExtendedAttributes.md
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+31 lines, -0 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/bindings/IDLExtendedAttributes.txt
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.h
|
View
|
1
2
3
4
5
6
7
8
|
3 chunks |
+8 lines, -0 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.cpp
|
View
|
1
2
3
4
5
6
7
8
|
4 chunks |
+18 lines, -12 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/bindings/core/v8/V8PrivateProperty.h
|
View
|
1
2
3
4
5
6
7
|
2 chunks |
+19 lines, -13 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/bindings/core/v8/V8PrivateProperty.cpp
|
View
|
1
2
3
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/bindings/core/v8/WindowProxy.cpp
|
View
|
1
2
3
4
5
6
7
|
2 chunks |
+4 lines, -3 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/bindings/scripts/v8_attributes.py
|
View
|
1
2
3
4
5
6
7
|
4 chunks |
+8 lines, -1 line |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/bindings/templates/attributes.cpp.tmpl
|
View
|
1
2
3
4
5
6
7
8
|
3 chunks |
+15 lines, -1 line |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/bindings/templates/interface.cpp.tmpl
|
View
|
1
2
3
4
5
6
7
8
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/bindings/templates/interface_base.cpp.tmpl
|
View
|
1
2
3
4
5
6
7
8
|
1 chunk |
+5 lines, -1 line |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/bindings/tests/results/core/V8SVGTestInterface.cpp
|
View
|
1
2
3
4
5
6
7
8
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/bindings/tests/results/core/V8TestException.cpp
|
View
|
1
2
3
4
5
6
7
8
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/bindings/tests/results/core/V8TestIntegerIndexed.cpp
|
View
|
1
2
3
4
5
6
7
8
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/bindings/tests/results/core/V8TestIntegerIndexedGlobal.cpp
|
View
|
1
2
3
4
5
6
7
8
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/bindings/tests/results/core/V8TestIntegerIndexedPrimaryGlobal.cpp
|
View
|
1
2
3
4
5
6
7
8
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface.cpp
|
View
|
1
2
3
4
5
6
7
8
|
5 chunks |
+53 lines, -53 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface3.cpp
|
View
|
1
2
3
4
5
6
7
8
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceCheckSecurity.cpp
|
View
|
1
2
3
4
5
6
7
8
|
2 chunks |
+9 lines, -9 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceDocument.cpp
|
View
|
1
2
3
4
5
6
7
8
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceEventInitConstructor.cpp
|
View
|
1
2
3
4
5
6
7
8
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceGarbageCollected.cpp
|
View
|
1
2
3
4
5
6
7
8
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceNamedConstructor.cpp
|
View
|
1
2
3
4
5
6
7
8
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceNode.cpp
|
View
|
1
2
3
4
5
6
7
8
|
1 chunk |
+7 lines, -7 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceOriginTrialEnabled.cpp
|
View
|
1
2
3
4
5
6
7
8
|
2 chunks |
+5 lines, -5 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceSecureContext.cpp
|
View
|
1
2
3
4
5
6
7
8
|
2 chunks |
+6 lines, -6 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/bindings/tests/results/core/V8TestNode.cpp
|
View
|
1
2
3
4
5
6
7
8
|
1 chunk |
+4 lines, -4 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/bindings/tests/results/core/V8TestObject.cpp
|
View
|
1
2
3
4
5
6
7
8
|
3 chunks |
+160 lines, -160 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/bindings/tests/results/core/V8TestTypedefs.cpp
|
View
|
1
2
3
4
5
6
7
8
|
1 chunk |
+3 lines, -3 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterface5.cpp
|
View
|
1
2
3
4
5
6
7
8
|
2 chunks |
+10 lines, -10 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterfacePartial.cpp
|
View
|
1
2
3
4
5
6
7
8
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/frame/Window.idl
|
View
|
1
2
3
4
5
6
7
8
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
Total messages: 50 (11 generated)
|