yukis...@chromium.org
unread,Oct 5, 2015, 3:08:27 AM10/5/15Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to caitpo...@gmail.com, j...@opera.com, joc...@chromium.org, jsb...@chromium.org, phil...@opera.com, ba...@chromium.org, chromium...@chromium.org, asa...@chromium.org, benjhayd...@chromium.org, dglazko...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, blink-re...@chromium.org
+bashi@ just in case.
https://codereview.chromium.org/1381413003/diff/1/third_party/WebKit/Source/bindings/templates/interface_base.cpp
File third_party/WebKit/Source/bindings/templates/interface_base.cpp
(right):
https://codereview.chromium.org/1381413003/diff/1/third_party/WebKit/Source/bindings/templates/interface_base.cpp#newcode350
third_party/WebKit/Source/bindings/templates/interface_base.cpp:350: if
(RuntimeEnabledFeatures::iterableCollectionsEnabled()) {
Could you use {% filter runtime_enabled(...) %}?
https://codereview.chromium.org/1381413003/diff/1/third_party/WebKit/Source/bindings/templates/interface_base.cpp#newcode351
third_party/WebKit/Source/bindings/templates/interface_base.cpp:351:
prototypeTemplate->Set(v8::Symbol::GetIterator(isolate),
v8::Array::GetValuesIterator(isolate), v8::DontEnum);
On 2015/10/04 23:10:47, caitp wrote:
> This doesn't use the V8DOMConfiguration helpers, because there isn't
any
> mechanism to set a symbol-keyed data property right now. It wouldn't
be too much
> work to add that, if that style is preferred?
> Anyways, the gist of the functionality is here --- if the interface is
found to
> have an integer-typed "length" attribute, and a getter which takes a
single
> "unsigned long" argument, AND no other iterator type is declared, then
the
> default ArrayValues iterator from V8 is used.
> The current version of this patch is blocked on
>
https://codereview.chromium.org/1378403004/ which exposes (all) of the
builtin
> Array iterator functions to the API. But, it could be rewritten to not
need
> that, and of course that CL can be shrunk a bit to not grow the native
context
> quite as much.
Could you follow the way of the following?
https://code.google.com/p/chromium/codesearch#chromium/src/third_party/WebKit/Source/bindings/templates/interface_base.cpp&l=431
Plus,
http://heycam.github.io/webidl/#es-iterators
says you need to define the iterator on the instance object, not on the
prototype object, in the case of [PrimaryGlobal] and [Global]. This
applies to Window interface.
I'm now introducing {{is_global}} in WIP CL
http://crrev.com/1386843002
, but it may take time. Feel free to define your own {{is_global}}.
https://codereview.chromium.org/1386843002/diff/1/third_party/WebKit/Source/bindings/scripts/v8_interface.py
https://codereview.chromium.org/1381413003/