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

Issue 360703003: Implement Blink-in-JS for DOM methods (Closed)

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

Description

Implement Blink-in-JS for DOM methods * This CL implements the core infrastructure of Blink-in-JS to support DOM methods. DOM attributes, DOM constants etc will be supported in follow-up CLs. * Developers can use Blink-in-JS as follows: (1) Implement DOM features in JavaScript. // Foo.js installClass("Foo", function(window) { var FooPrototype = {}; FooPrototype.method = function(a, b) { ... } // DOM method return FooPrototype; }); (2) Add an [ImplementedInPrivateScript] IDL attribute to Foo.idl. // Foo.idl interface Foo { [ImplementedInPrivateScript] DOMString method(short a, Node b); }; * For more details, see changes to Internals.js and Internals.idl. * bindings/scripts/v8_methods.py and bindings/templates/methods.cpp implement the binding layer that connects DOM methods with private scripts. Only primitive types and DOM wrappers are allowed as types of return values and parameter values of Blink-in-JS. BUG=341031 TEST=fast/dom/private_script_unittest.html Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=177298

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Total comments: 8

Patch Set 4 : #

Patch Set 5 : #

Total comments: 1

Patch Set 6 : #

Patch Set 7 : #

Patch Set 8 : #

Patch Set 9 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+705 lines, -17 lines) Patch
M LayoutTests/TestExpectations View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download
A LayoutTests/fast/dom/private_script_unittest.html View 1 chunk +54 lines, -0 lines 0 comments Download
A LayoutTests/fast/dom/private_script_unittest-expected.txt View 1 chunk +28 lines, -0 lines 0 comments Download
M Source/bindings/IDLExtendedAttributes.txt View 1 chunk +1 line, -0 lines 0 comments Download
M Source/bindings/core/v8/PrivateScriptRunner.h View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/core/v8/PrivateScriptRunner.cpp View 1 2 3 4 5 6 7 3 chunks +23 lines, -6 lines 0 comments Download
M Source/bindings/core/v8/PrivateScriptRunner.js View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/scripts/idl_types.py View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
M Source/bindings/scripts/v8_methods.py View 1 2 3 4 5 6 7 8 10 chunks +50 lines, -4 lines 0 comments Download
M Source/bindings/scripts/v8_types.py View 1 2 3 4 5 6 7 2 chunks +2 lines, -1 line 0 comments Download
M Source/bindings/scripts/v8_utilities.py View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download
M Source/bindings/templates/interface_base.cpp View 1 2 3 1 chunk +5 lines, -1 line 0 comments Download
M Source/bindings/templates/methods.cpp View 1 2 2 chunks +50 lines, -0 lines 0 comments Download
M Source/bindings/tests/idls/TestObject.idl View 1 chunk +9 lines, -0 lines 0 comments Download
M Source/bindings/tests/results/V8TestObject.cpp View 1 2 3 4 5 6 7 8 4 chunks +320 lines, -0 lines 0 comments Download
M Source/build/scripts/make_private_script_source.py View 1 2 3 3 chunks +5 lines, -3 lines 0 comments Download
M Source/core/BUILD.gn View 1 2 3 4 5 6 7 2 chunks +20 lines, -0 lines 0 comments Download
M Source/core/core_generated.gyp View 1 2 3 4 5 6 7 1 chunk +19 lines, -0 lines 0 comments Download
M Source/core/testing/Internals.idl View 1 2 3 4 5 6 7 1 chunk +20 lines, -0 lines 0 comments Download
A Source/core/testing/Internals.js View 1 2 3 4 5 1 chunk +89 lines, -0 lines 0 comments Download

Messages

Total messages: 24 (0 generated)
haraken
abarth@, dcarney@: PTAL. Sorry about a large CL, but this is a minimum CL to ...
6 years, 5 months ago (2014-06-30 13:04:17 UTC) #1
abarth-chromium
On 2014/06/30 at 13:04:17, haraken wrote: > abarth@, dcarney@: PTAL. > > Sorry about a ...
6 years, 5 months ago (2014-06-30 17:54:17 UTC) #2
Jens Widell
https://codereview.chromium.org/360703003/diff/40001/Source/bindings/scripts/idl_types.py File Source/bindings/scripts/idl_types.py (right): https://codereview.chromium.org/360703003/diff/40001/Source/bindings/scripts/idl_types.py#newcode331 Source/bindings/scripts/idl_types.py:331: def is_typed_array_type(self): A bit asymmetrical I suppose to implement ...
6 years, 5 months ago (2014-06-30 18:32:37 UTC) #3
haraken
abarth@: PTAL at overall design. I enabled the unittests only in Debug builds. Specifically, I ...
6 years, 5 months ago (2014-07-01 04:09:56 UTC) #4
abarth-chromium
I didn't look at the code generator, but the generated code and the tests LGTM! ...
6 years, 5 months ago (2014-07-01 04:52:31 UTC) #5
Jens Widell
Code generator LGTM.
6 years, 5 months ago (2014-07-01 05:31:55 UTC) #6
haraken
Thanks for review! Landing. (I added Internals.js, which I forgot to add.)
6 years, 5 months ago (2014-07-01 07:52:27 UTC) #7
haraken
The CQ bit was checked by haraken@chromium.org
6 years, 5 months ago (2014-07-01 07:52:31 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/haraken@chromium.org/360703003/110001
6 years, 5 months ago (2014-07-01 07:53:32 UTC) #9
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: win_blink_compile_dbg on tryserver.blink ...
6 years, 5 months ago (2014-07-01 08:55:00 UTC) #10
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 5 months ago (2014-07-01 08:59:21 UTC) #11
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/14801)
6 years, 5 months ago (2014-07-01 08:59:22 UTC) #12
haraken
The CQ bit was checked by haraken@chromium.org
6 years, 5 months ago (2014-07-01 08:59:40 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/haraken@chromium.org/360703003/110001
6 years, 5 months ago (2014-07-01 08:59:53 UTC) #14
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 5 months ago (2014-07-01 09:00:15 UTC) #15
commit-bot: I haz the power
Failed to apply patch for Source/bindings/tests/results/V8TestObject.cpp: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
6 years, 5 months ago (2014-07-01 09:00:16 UTC) #16
haraken
The CQ bit was checked by haraken@chromium.org
6 years, 5 months ago (2014-07-01 09:43:53 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/haraken@chromium.org/360703003/130001
6 years, 5 months ago (2014-07-01 09:45:49 UTC) #18
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: android_blink_compile_dbg on tryserver.blink ...
6 years, 5 months ago (2014-07-01 10:28:15 UTC) #19
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 5 months ago (2014-07-01 10:35:11 UTC) #20
commit-bot: I haz the power
Try jobs failed on following builders: linux_blink_rel on tryserver.blink (http://build.chromium.org/p/tryserver.blink/builders/linux_blink_rel/builds/14277)
6 years, 5 months ago (2014-07-01 10:35:12 UTC) #21
haraken
The CQ bit was checked by haraken@chromium.org
6 years, 5 months ago (2014-07-01 10:43:43 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/haraken@chromium.org/360703003/150001
6 years, 5 months ago (2014-07-01 10:44:29 UTC) #23
commit-bot: I haz the power
6 years, 5 months ago (2014-07-01 11:50:34 UTC) #24
Message was sent while issue was closed.
Change committed as 177298

Powered by Google App Engine
This is Rietveld 408576698