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

Unified Diff: Source/bindings/tests/results/core/V8TestInterfaceEventInit.cpp

Issue 759893002: IDL: Auto-generate NativeValueTraits for IDL dictionaries (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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: Source/bindings/tests/results/core/V8TestInterfaceEventInit.cpp
diff --git a/Source/bindings/tests/results/core/V8TestInterfaceEventInit.cpp b/Source/bindings/tests/results/core/V8TestInterfaceEventInit.cpp
index d6fa03fd01103b1f8b151cb91b0ae3e5bf63b018..9ee8ce1645f2e3b48a732de6b9e291d306101c29 100644
--- a/Source/bindings/tests/results/core/V8TestInterfaceEventInit.cpp
+++ b/Source/bindings/tests/results/core/V8TestInterfaceEventInit.cpp
@@ -38,7 +38,7 @@ void V8TestInterfaceEventInit::toImpl(v8::Isolate* isolate, v8::Handle<v8::Value
}
-v8::Handle<v8::Value> toV8(TestInterfaceEventInit& impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
+v8::Handle<v8::Value> toV8(const TestInterfaceEventInit& impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
{
v8::Handle<v8::Object> v8Object = v8::Object::New(isolate);
toV8EventInitDictionary(impl, v8Object, creationContext, isolate);
@@ -46,7 +46,13 @@ v8::Handle<v8::Value> toV8(TestInterfaceEventInit& impl, v8::Handle<v8::Object>
return v8Object;
}
-void toV8TestInterfaceEventInit(TestInterfaceEventInit& impl, v8::Handle<v8::Object> dictionary, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
+template<>
+v8::Handle<v8::Value> toV8NoInline(const TestInterfaceEventInit* impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
+{
+ return toV8(*impl, creationContext, isolate);
+}
+
+void toV8TestInterfaceEventInit(const TestInterfaceEventInit& impl, v8::Handle<v8::Object> dictionary, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
{
if (impl.hasStringMember()) {
dictionary->Set(v8String(isolate, "stringMember"), v8String(isolate, impl.stringMember()));
@@ -54,4 +60,11 @@ void toV8TestInterfaceEventInit(TestInterfaceEventInit& impl, v8::Handle<v8::Obj
}
+TestInterfaceEventInit NativeValueTraits<TestInterfaceEventInit>::nativeValue(const v8::Handle<v8::Value>& value, v8::Isolate* isolate, ExceptionState& exceptionState)
+{
+ TestInterfaceEventInit impl;
+ V8TestInterfaceEventInit::toImpl(isolate, value, impl, exceptionState);
+ return impl;
+}
+
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698