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

Unified Diff: third_party/WebKit/Source/bindings/templates/union_container.cpp.tmpl

Issue 2810843002: bindings: Make the sequence conversion code more complaint with WebIDL. (Closed)
Patch Set: Adjust even more tests Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/bindings/templates/union_container.cpp.tmpl
diff --git a/third_party/WebKit/Source/bindings/templates/union_container.cpp.tmpl b/third_party/WebKit/Source/bindings/templates/union_container.cpp.tmpl
index e361c1b8ac69763b698f5aea204362401a705175..5374e7c8cd437fd89dba438caec91d0a9bcd21de 100644
--- a/third_party/WebKit/Source/bindings/templates/union_container.cpp.tmpl
+++ b/third_party/WebKit/Source/bindings/templates/union_container.cpp.tmpl
@@ -109,10 +109,7 @@ void {{v8_class}}::toImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value, {{
{% endif %}
{% if array_or_sequence_type %}
{# 11.1, 11.2. Arrays and Sequences #}
- {# FIXME: This should also check "object but not RegExp". Add checks
- when we implement conversions for Date and RegExp. #}
- {# TODO(bashi): Should check @@iterator symbol instead. #}
- if (v8Value->IsArray()) {
+ if (IsV8Sequence(isolate, v8Value, exceptionState)) {
{{v8_value_to_local_cpp_value(array_or_sequence_type) | indent}}
impl.set{{array_or_sequence_type.type_name}}(cppValue);
return;

Powered by Google App Engine
This is Rietveld 408576698