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

Unified Diff: third_party/WebKit/Source/bindings/scripts/v8_types.py

Issue 1730323002: Make nullable DOMString always treat undefined as null (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase test results Created 4 years, 10 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/scripts/v8_types.py
diff --git a/third_party/WebKit/Source/bindings/scripts/v8_types.py b/third_party/WebKit/Source/bindings/scripts/v8_types.py
index 04739d2e46ae0fb02a255a9e12b9a11cd68c2554..5df76dbb6f6e1bc4c81853b0271fe0a83b592e25 100644
--- a/third_party/WebKit/Source/bindings/scripts/v8_types.py
+++ b/third_party/WebKit/Source/bindings/scripts/v8_types.py
@@ -144,10 +144,12 @@ def cpp_type(idl_type, extended_attributes=None, raw_type=False, used_as_rvalue_
def string_mode():
if extended_attributes.get('TreatNullAs') == 'EmptyString':
return 'TreatNullAsEmptyString'
- if idl_type.is_nullable or extended_attributes.get('TreatNullAs') == 'NullString':
+ if extended_attributes.get('TreatNullAs') == 'NullString':
if extended_attributes.get('TreatUndefinedAs') == 'NullString':
return 'TreatNullAndUndefinedAsNullString'
return 'TreatNullAsNullString'
+ if idl_type.is_nullable:
+ return 'TreatNullAndUndefinedAsNullString'
return ''
extended_attributes = extended_attributes or {}

Powered by Google App Engine
This is Rietveld 408576698