Chromium Code Reviews| Index: third_party/WebKit/Source/bindings/templates/interface_base.cpp.tmpl |
| diff --git a/third_party/WebKit/Source/bindings/templates/interface_base.cpp.tmpl b/third_party/WebKit/Source/bindings/templates/interface_base.cpp.tmpl |
| index e0807a7bb7f1b50008603ed66e56f95cf9e9afc5..0d3e67158dd9226945d1d4d6282221f9f08ea1c5 100644 |
| --- a/third_party/WebKit/Source/bindings/templates/interface_base.cpp.tmpl |
| +++ b/third_party/WebKit/Source/bindings/templates/interface_base.cpp.tmpl |
| @@ -514,6 +514,14 @@ static void install{{v8_class}}Template(v8::Isolate* isolate, const DOMWrapperWo |
| {% if has_array_iterator and not is_partial %} |
| // Array iterator (@@iterator) |
| {%+ if is_global %}instanceTemplate{% else %}prototypeTemplate{% endif %}->SetIntrinsicDataProperty(v8::Symbol::GetIterator(isolate), v8::kArrayProto_values, v8::DontEnum); |
| + {% if iterable %} |
| + // For value iterators, the properties below must originally be set to the corresponding ones in %ArrayPrototype%. |
| + // See https://heycam.github.io/webidl/#es-iterators. |
| + {%+ if is_global %}instanceTemplate{% else %}prototypeTemplate{% endif %}->SetIntrinsicDataProperty(v8AtomicString(isolate, "entries"), v8::kArrayProto_entries); |
|
Yuki
2017/02/09 08:01:56
This is just fine, but I think [Global] or [Primar
Raphael Kubo da Costa (rakuco)
2017/02/09 10:14:28
While I haven't encountered any uses of [Global]/[
Yuki
2017/02/09 13:03:18
Yes, that's true. My point is that we don't want
|
| + {%+ if is_global %}instanceTemplate{% else %}prototypeTemplate{% endif %}->SetIntrinsicDataProperty(v8AtomicString(isolate, "forEach"), v8::kArrayProto_forEach); |
| + {%+ if is_global %}instanceTemplate{% else %}prototypeTemplate{% endif %}->SetIntrinsicDataProperty(v8AtomicString(isolate, "keys"), v8::kArrayProto_keys); |
| + {%+ if is_global %}instanceTemplate{% else %}prototypeTemplate{% endif %}->SetIntrinsicDataProperty(v8AtomicString(isolate, "values"), v8::kArrayProto_values); |
| + {% endif %} |
| {% endif %} |
| {% if iterator_method %} |