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

Unified Diff: third_party/WebKit/Source/bindings/templates/callback_function.cpp.tmpl

Issue 2709983004: WIP bindings: Add support for the record<K,V> WebIDL type. (Closed)
Patch Set: Rebased patch using NativeValueTraits for IDL types Created 3 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: third_party/WebKit/Source/bindings/templates/callback_function.cpp.tmpl
diff --git a/third_party/WebKit/Source/bindings/templates/callback_function.cpp.tmpl b/third_party/WebKit/Source/bindings/templates/callback_function.cpp.tmpl
index ccf2c5d782c48881e86f51e95972dcb01bea7ae9..def34ae745b35433cc3fa9788fe06de4c50002a2 100644
--- a/third_party/WebKit/Source/bindings/templates/callback_function.cpp.tmpl
+++ b/third_party/WebKit/Source/bindings/templates/callback_function.cpp.tmpl
@@ -74,6 +74,10 @@ bool {{cpp_class}}::call({{argument_declarations | join(', ')}}) {
return false;
}
+{{cpp_class}}* NativeValueTraits<{{cpp_class}}>::nativeValue(v8::Isolate* isolate, v8::Local<v8::Value> value, ExceptionState& exceptionState) {
+ return {{cpp_class}}::create(ScriptState::current(isolate), value);
+}
+
} // namespace blink
{% endfilter %}{# format_blink_cpp_source_code #}

Powered by Google App Engine
This is Rietveld 408576698