| Index: Source/bindings/templates/union.h
|
| diff --git a/Source/bindings/templates/union.h b/Source/bindings/templates/union.h
|
| index 5cb527951b64f2bd57521e9ba4f9a7b47b41dc2e..54a913d985fcddac528948ad25fd06f1a17b3407 100644
|
| --- a/Source/bindings/templates/union.h
|
| +++ b/Source/bindings/templates/union.h
|
| @@ -62,6 +62,21 @@ inline void v8SetReturnValue(const CallbackInfo& callbackInfo, {{container.cpp_c
|
| }
|
|
|
| {% endfor %}
|
| +
|
| +{% for nullable_container in nullable_containers %}
|
| +class V8{{nullable_container.cpp_class}}OrNull final {
|
| +public:
|
| + static void toImpl(v8::Isolate* isolate, v8::Handle<v8::Value> v8Value, {{nullable_container.cpp_class}}& impl, ExceptionState& exceptionState)
|
| + {
|
| + {# http://heycam.github.io/webidl/#es-union #}
|
| + {# 1. null or undefined #}
|
| + if (isUndefinedOrNull(v8Value))
|
| + return;
|
| + V8{{nullable_container.cpp_class}}::toImpl(isolate, v8Value, impl, exceptionState);
|
| + }
|
| +};
|
| +
|
| +{% endfor %}
|
| } // namespace blink
|
|
|
| #endif // {{macro_guard}}
|
|
|