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

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

Issue 337373002: Add [TreatReturnedNullStringAs] support for ByteString. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: add test Created 6 years, 6 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
« no previous file with comments | « LayoutTests/fast/js/webidl-type-mapping-expected.txt ('k') | Source/bindings/tests/idls/TestObject.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/scripts/v8_types.py
diff --git a/Source/bindings/scripts/v8_types.py b/Source/bindings/scripts/v8_types.py
index bb2fac1f410d8fcbe0199c712b84efbc2dad3ed0..34af136995135f5944db250e873c4fbef789a46a 100644
--- a/Source/bindings/scripts/v8_types.py
+++ b/Source/bindings/scripts/v8_types.py
@@ -536,9 +536,9 @@ def v8_conversion_type(idl_type, extended_attributes):
return 'int'
if base_idl_type in CPP_UNSIGNED_TYPES:
return 'unsigned'
- if base_idl_type == 'DOMString':
+ if base_idl_type in ('DOMString', 'ByteString'):
if 'TreatReturnedNullStringAs' not in extended_attributes:
- return 'DOMString'
+ return base_idl_type
treat_returned_null_string_as = extended_attributes['TreatReturnedNullStringAs']
if treat_returned_null_string_as == 'Null':
return 'StringOrNull'
« no previous file with comments | « LayoutTests/fast/js/webidl-type-mapping-expected.txt ('k') | Source/bindings/tests/idls/TestObject.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698