|
Blink-in-JS: Implement internal APIs exposed only to private scripts
This is the final part of the core infrastructure of Blink-in-JS. This CL implements internal APIs exposed only to private scripts. They are not visible from user's JavaScript. They are needed for moving XSLT and editing/ to Blink-in-JS.
Here is a summary of the IDL extended attributes around private scripts:
interface X {
aaa();
[ImplementedInPrivateScript] bbb();
[OnlyExposedToPrivateScript] ccc();
[ImplementedInPrivateScript, OnlyExposedToPrivateScript] ddd();
};
- aaa() is a normal DOM method implemented in C++. aaa() is exposed to both user's JavaScript and private scripts.
- bbb() is implemented in a private script. bbb() is exposed to both user's JavaScript and private scripts.
- ccc() is implemented in C++. ccc() is exposed only to private scripts.
- ddd() is implemented in a private script. ddd() is not exposed to user's JavaScript nor private scripts. V8X::ddd() is exposed to C++ so that Blink can invoke ddd() from C++.
In other words, we essentially need the following four kinds of APIs, and the two IDL attributes control the kind of each API.
- user's JS & private scripts => C++ (e.g., aaa())
- user's JS & private scripts => private scripts (e.g., bbb())
- private scripts => C++ (e.g., ccc())
- C++ => private scripts (e.g., ddd())
This design might be a bit confusing but this is the least confusing design we can come up with at the moment.
BUG= 341031
TEST=fast/dom/private-script-unittest.html
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=178974
Total comments: 6
Total comments: 6
Total comments: 2
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+640 lines, -509 lines) |
Patch |
 |
M |
LayoutTests/fast/dom/private_script_unittest.html
|
View
|
|
1 chunk |
+9 lines, -0 lines |
0 comments
|
Download
|
 |
M |
LayoutTests/fast/dom/private_script_unittest-expected.txt
|
View
|
1
2
3
4
5
6
|
1 chunk |
+5 lines, -0 lines |
0 comments
|
Download
|
 |
M |
Source/bindings/core/v8/V8DOMConfiguration.h
|
View
|
|
5 chunks |
+13 lines, -1 line |
0 comments
|
Download
|
 |
M |
Source/bindings/core/v8/V8DOMConfiguration.cpp
|
View
|
|
2 chunks |
+10 lines, -4 lines |
0 comments
|
Download
|
 |
M |
Source/bindings/scripts/v8_attributes.py
|
View
|
1
2
|
3 chunks |
+5 lines, -1 line |
0 comments
|
Download
|
 |
M |
Source/bindings/scripts/v8_interface.py
|
View
|
1
2
3
4
5
6
7
|
2 chunks |
+4 lines, -2 lines |
0 comments
|
Download
|
 |
M |
Source/bindings/scripts/v8_methods.py
|
View
|
1
2
|
2 chunks |
+6 lines, -1 line |
0 comments
|
Download
|
 |
M |
Source/bindings/templates/interface.cpp
|
View
|
1
2
3
4
5
6
7
|
9 chunks |
+12 lines, -18 lines |
0 comments
|
Download
|
 |
M |
Source/bindings/templates/interface_base.cpp
|
View
|
1
2
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
Source/bindings/tests/idls/TestObject.idl
|
View
|
1
2
3
|
1 chunk |
+4 lines, -2 lines |
0 comments
|
Download
|
 |
M |
Source/bindings/tests/results/V8SVGTestInterface.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/bindings/tests/results/V8TestException.cpp
|
View
|
|
2 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
 |
M |
Source/bindings/tests/results/V8TestInterface.cpp
|
View
|
|
8 chunks |
+36 lines, -36 lines |
0 comments
|
Download
|
 |
M |
Source/bindings/tests/results/V8TestInterface2.cpp
|
View
|
|
1 chunk |
+8 lines, -8 lines |
0 comments
|
Download
|
 |
M |
Source/bindings/tests/results/V8TestInterfaceCheckSecurity.cpp
|
View
|
|
2 chunks |
+10 lines, -10 lines |
0 comments
|
Download
|
 |
M |
Source/bindings/tests/results/V8TestInterfaceEventConstructor.cpp
|
View
|
|
1 chunk |
+12 lines, -12 lines |
0 comments
|
Download
|
 |
M |
Source/bindings/tests/results/V8TestInterfaceGarbageCollected.cpp
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
Source/bindings/tests/results/V8TestInterfaceNamedConstructor.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/bindings/tests/results/V8TestInterfaceNode.cpp
|
View
|
|
1 chunk |
+9 lines, -9 lines |
0 comments
|
Download
|
 |
M |
Source/bindings/tests/results/V8TestInterfaceWillBeGarbageCollected.cpp
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
Source/bindings/tests/results/V8TestNode.cpp
|
View
|
|
1 chunk |
+4 lines, -4 lines |
0 comments
|
Download
|
 |
M |
Source/bindings/tests/results/V8TestObject.h
|
View
|
1
2
3
|
2 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
 |
M |
Source/bindings/tests/results/V8TestObject.cpp
|
View
|
1
2
3
|
12 chunks |
+433 lines, -376 lines |
0 comments
|
Download
|
 |
M |
Source/bindings/tests/results/V8TestSpecialOperations.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/bindings/tests/results/V8TestTypedefs.cpp
|
View
|
|
1 chunk |
+9 lines, -9 lines |
0 comments
|
Download
|
 |
M |
Source/core/testing/PrivateScriptTest.h
|
View
|
|
2 chunks |
+8 lines, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/testing/PrivateScriptTest.cpp
|
View
|
|
1 chunk |
+15 lines, -0 lines |
0 comments
|
Download
|
 |
M |
Source/core/testing/PrivateScriptTest.idl
|
View
|
|
1 chunk |
+4 lines, -0 lines |
0 comments
|
Download
|
 |
M |
Source/core/testing/PrivateScriptTest.js
|
View
|
1
2
3
4
5
|
1 chunk |
+9 lines, -0 lines |
0 comments
|
Download
|
Total messages: 31 (0 generated)
|