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

Issue 413393003: Blink-in-JS: Implement internal APIs exposed only to private scripts (Closed)

Created:
6 years, 5 months ago by haraken
Modified:
6 years, 5 months ago
CC:
blink-reviews, blink-reviews-bindings_chromium.org, arv+blink, Inactive, abarth-chromium
Project:
blink
Visibility:
Public.

Description

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

Patch Set 1 #

Total comments: 6

Patch Set 2 : #

Total comments: 6

Patch Set 3 : #

Patch Set 4 : #

Total comments: 2

Patch Set 5 : #

Patch Set 6 : #

Patch Set 7 : #

Patch Set 8 : #

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

Messages

Total messages: 31 (0 generated)
haraken
bashi@: PTAL at the IDL compiler. tasak@: PTAL at the overall design. abarth@ is on ...
6 years, 5 months ago (2014-07-25 07:11:37 UTC) #1
bashi
IDL compiler LGTM. https://codereview.chromium.org/413393003/diff/1/Source/bindings/templates/interface.cpp File Source/bindings/templates/interface.cpp (right): https://codereview.chromium.org/413393003/diff/1/Source/bindings/templates/interface.cpp#newcode734 Source/bindings/templates/interface.cpp:734: {% if not attribute.is_implemented_in_private_script or not ...
6 years, 5 months ago (2014-07-25 07:57:42 UTC) #2
haraken
Thanks for review. https://codereview.chromium.org/413393003/diff/1/Source/bindings/templates/interface.cpp File Source/bindings/templates/interface.cpp (right): https://codereview.chromium.org/413393003/diff/1/Source/bindings/templates/interface.cpp#newcode734 Source/bindings/templates/interface.cpp:734: {% if not attribute.is_implemented_in_private_script or not ...
6 years, 5 months ago (2014-07-25 08:26:59 UTC) #3
Jens Widell
https://codereview.chromium.org/413393003/diff/20001/Source/bindings/scripts/v8_attributes.py File Source/bindings/scripts/v8_attributes.py (right): https://codereview.chromium.org/413393003/diff/20001/Source/bindings/scripts/v8_attributes.py#newcode147 Source/bindings/scripts/v8_attributes.py:147: 'should_be_exposed_to_script': not is_implemented_in_private_script or not is_only_exposed_to_private_script, Might be a ...
6 years, 5 months ago (2014-07-25 09:45:36 UTC) #4
haraken
https://codereview.chromium.org/413393003/diff/20001/Source/bindings/scripts/v8_attributes.py File Source/bindings/scripts/v8_attributes.py (right): https://codereview.chromium.org/413393003/diff/20001/Source/bindings/scripts/v8_attributes.py#newcode147 Source/bindings/scripts/v8_attributes.py:147: 'should_be_exposed_to_script': not is_implemented_in_private_script or not is_only_exposed_to_private_script, On 2014/07/25 09:45:36, ...
6 years, 5 months ago (2014-07-25 09:58:19 UTC) #5
Jens Widell
Maybe add a method (and an attribute) corresponding to the ccc() variant to TestObject.idl?
6 years, 5 months ago (2014-07-25 10:10:37 UTC) #6
haraken
On 2014/07/25 10:10:37, Jens Lindström wrote: > Maybe add a method (and an attribute) corresponding ...
6 years, 5 months ago (2014-07-25 10:45:31 UTC) #7
Jens Widell
(I don't have source code access currently, so haven't reviewed as thoroughly as I would ...
6 years, 5 months ago (2014-07-25 11:09:45 UTC) #8
haraken
https://codereview.chromium.org/413393003/diff/60001/Source/bindings/templates/interface.cpp File Source/bindings/templates/interface.cpp (right): https://codereview.chromium.org/413393003/diff/60001/Source/bindings/templates/interface.cpp#newcode1070 Source/bindings/templates/interface.cpp:1070: "{{method.name}}", {{method_callback}}, {{method_callback_for_main_world}}, {{method.length}}, V8DOMConfiguration::ExposedToAllScripts, On 2014/07/25 11:09:45, Jens ...
6 years, 5 months ago (2014-07-25 13:22:16 UTC) #9
haraken
The CQ bit was checked by haraken@chromium.org
6 years, 5 months ago (2014-07-25 13:22:33 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/haraken@chromium.org/413393003/80001
6 years, 5 months ago (2014-07-25 13:23:20 UTC) #11
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 5 months ago (2014-07-25 13:23:49 UTC) #12
commit-bot: I haz the power
Failed to apply patch for Source/core/testing/PrivateScriptTest.js: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
6 years, 5 months ago (2014-07-25 13:23:49 UTC) #13
haraken
The CQ bit was checked by haraken@chromium.org
6 years, 5 months ago (2014-07-25 13:25:46 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/haraken@chromium.org/413393003/100001
6 years, 5 months ago (2014-07-25 13:26:34 UTC) #15
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: linux_blink_dbg on tryserver.blink ...
6 years, 5 months ago (2014-07-25 14:31:32 UTC) #16
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 5 months ago (2014-07-25 15:34:12 UTC) #17
commit-bot: I haz the power
Try jobs failed on following builders: linux_blink_dbg on tryserver.blink (http://build.chromium.org/p/tryserver.blink/builders/linux_blink_dbg/builds/18080)
6 years, 5 months ago (2014-07-25 15:34:13 UTC) #18
haraken
The CQ bit was checked by haraken@chromium.org
6 years, 5 months ago (2014-07-25 15:35:58 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/haraken@chromium.org/413393003/100001
6 years, 5 months ago (2014-07-25 15:36:48 UTC) #20
haraken
The CQ bit was checked by haraken@chromium.org
6 years, 5 months ago (2014-07-25 16:29:02 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/haraken@chromium.org/413393003/90028
6 years, 5 months ago (2014-07-25 16:29:14 UTC) #22
haraken
The CQ bit was checked by haraken@chromium.org
6 years, 5 months ago (2014-07-25 16:34:10 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/haraken@chromium.org/413393003/130001
6 years, 5 months ago (2014-07-25 16:34:21 UTC) #24
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: win_blink_rel on tryserver.blink ...
6 years, 5 months ago (2014-07-25 17:37:18 UTC) #25
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 5 months ago (2014-07-25 18:22:29 UTC) #26
commit-bot: I haz the power
Try jobs failed on following builders: win_blink_rel on tryserver.blink (http://build.chromium.org/p/tryserver.blink/builders/win_blink_rel/builds/18988)
6 years, 5 months ago (2014-07-25 18:22:30 UTC) #27
haraken
The CQ bit was checked by haraken@chromium.org
6 years, 5 months ago (2014-07-25 22:46:07 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/haraken@chromium.org/413393003/130001
6 years, 5 months ago (2014-07-25 22:46:58 UTC) #29
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: win_blink_rel on tryserver.blink ...
6 years, 5 months ago (2014-07-26 00:03:07 UTC) #30
commit-bot: I haz the power
6 years, 5 months ago (2014-07-26 00:52:57 UTC) #31
Message was sent while issue was closed.
Change committed as 178974

Powered by Google App Engine
This is Rietveld 408576698