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

Unified Diff: Source/bindings/templates/union.h

Issue 946973005: IDL: Drop value conversion (V8 -> C++) macros from generated code (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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/templates/union.h
diff --git a/Source/bindings/templates/union.h b/Source/bindings/templates/union.h
index 24d0bb7373bf82186c797fd43e0c24633469346c..5d48dfc3e30339f19ce1019232719d00bcca89c0 100644
--- a/Source/bindings/templates/union.h
+++ b/Source/bindings/templates/union.h
@@ -53,7 +53,7 @@ private:
class V8{{container.cpp_class}} final {
public:
- static void toImpl(v8::Isolate*, v8::Local<v8::Value>, {{container.cpp_class}}&, ExceptionState&);
+ static bool toImpl(v8::Isolate*, v8::Local<v8::Value>, {{container.cpp_class}}&, ExceptionState&);
};
v8::Local<v8::Value> toV8(const {{container.cpp_class}}&, v8::Local<v8::Object>, v8::Isolate*);
@@ -73,13 +73,13 @@ struct NativeValueTraits<{{container.cpp_class}}> {
{% for cpp_type in nullable_cpp_types %}
class V8{{cpp_type}}OrNull final {
public:
- static void toImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value, {{cpp_type}}& impl, ExceptionState& exceptionState)
+ static bool toImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value, {{cpp_type}}& impl, ExceptionState& exceptionState)
{
{# http://heycam.github.io/webidl/#es-union #}
{# 1. null or undefined #}
if (isUndefinedOrNull(v8Value))
- return;
- V8{{cpp_type}}::toImpl(isolate, v8Value, impl, exceptionState);
+ return true;
+ return V8{{cpp_type}}::toImpl(isolate, v8Value, impl, exceptionState);
}
};

Powered by Google App Engine
This is Rietveld 408576698