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

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

Issue 2464163005: Drop support for [TreatUndefinedAs=NullString] (Closed)
Patch Set: Created 4 years, 1 month 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 fdb540e2ade2977f1a5a847fb0c1b5216264ac36..6fcbe63720776dc8f650397d49b3e84f82d65448 100644
--- a/third_party/WebKit/Source/bindings/scripts/v8_types.py
+++ b/third_party/WebKit/Source/bindings/scripts/v8_types.py
@@ -143,14 +143,12 @@ def cpp_type(idl_type, extended_attributes=None, raw_type=False, used_as_rvalue_
Containers can be an array, a sequence or a dictionary.
"""
def string_mode():
+ if idl_type.is_nullable:
+ return 'TreatNullAndUndefinedAsNullString'
if extended_attributes.get('TreatNullAs') == 'EmptyString':
return 'TreatNullAsEmptyString'
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