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

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

Issue 2809543002: bindings: Pass is_null flag to attribute setters when they are nullable (Closed)
Patch Set: 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/attributes.cpp.tmpl
diff --git a/third_party/WebKit/Source/bindings/templates/attributes.cpp.tmpl b/third_party/WebKit/Source/bindings/templates/attributes.cpp.tmpl
index 87ee2a8f6f49326dad532fb97ac9e4834db93005..55fa01b6bb9f9ed8c41477e00f268cf9f59a4609 100644
--- a/third_party/WebKit/Source/bindings/templates/attributes.cpp.tmpl
+++ b/third_party/WebKit/Source/bindings/templates/attributes.cpp.tmpl
@@ -396,6 +396,9 @@ v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info
{% if attribute.is_replaceable %}
v8::Local<v8::String> propertyName = V8AtomicString(isolate, "{{attribute.name}}");
{% endif %}
+ {% if attribute.is_explicit_nullable %}
+ bool isNull = IsUndefinedOrNull(v8Value);
+ {% endif %}
{{attribute.cpp_setter}};
{% if attribute.cached_attribute_validation_method %}

Powered by Google App Engine
This is Rietveld 408576698