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

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

Issue 928233002: IDL: Don't lose nullable flag when "preprocessing" type (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: fix compilation Created 5 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: Source/bindings/scripts/v8_types.py
diff --git a/Source/bindings/scripts/v8_types.py b/Source/bindings/scripts/v8_types.py
index c87b5101cfda7dc1ca4c40d4907d3f025eb221ef..8759fb7c948963e4ba0e45a2b0a9b2c0f1b3329a 100644
--- a/Source/bindings/scripts/v8_types.py
+++ b/Source/bindings/scripts/v8_types.py
@@ -671,10 +671,12 @@ IdlTypeBase.use_output_parameter_for_result = property(use_output_parameter_for_
################################################################################
def preprocess_idl_type(idl_type):
+ if idl_type.is_nullable:
+ return IdlNullableType(idl_type.inner_type.preprocessed_type)
if idl_type.is_enum:
# Enumerations are internally DOMStrings
return IdlType('DOMString')
- if (idl_type.name in ['Any', 'Object'] or idl_type.is_callback_function):
Jens Widell 2015/02/16 14:33:54 Looking at idl_type.name here was wrong; it would
+ if idl_type.base_type in ['any', 'object'] or idl_type.is_callback_function:
return IdlType('ScriptValue')
return idl_type
« no previous file with comments | « no previous file | Source/bindings/tests/idls/core/TestObject.idl » ('j') | Source/core/html/canvas/WebGLRenderingContextBase.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698