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

Unified Diff: third_party/WebKit/Source/bindings/templates/dictionary_v8.h.tmpl

Issue 2653093002: [bindings] Allow dictionary and union types to be returned from static methods. (Closed)
Patch Set: Created 3 years, 11 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/dictionary_v8.h.tmpl
diff --git a/third_party/WebKit/Source/bindings/templates/dictionary_v8.h.tmpl b/third_party/WebKit/Source/bindings/templates/dictionary_v8.h.tmpl
index a08196f104503716a4c35298048ec709440c8ace..3681457ff617e2e3b26598259dc3fa4203869a66 100644
--- a/third_party/WebKit/Source/bindings/templates/dictionary_v8.h.tmpl
+++ b/third_party/WebKit/Source/bindings/templates/dictionary_v8.h.tmpl
@@ -19,11 +19,16 @@ class {{v8_class}} {
{{exported}}bool toV8{{cpp_class}}(const {{cpp_class}}&, v8::Local<v8::Object> dictionary, v8::Local<v8::Object> creationContext, v8::Isolate*);
-template<class CallbackInfo>
+template <class CallbackInfo>
inline void v8SetReturnValue(const CallbackInfo& callbackInfo, {{cpp_class}}& impl) {
v8SetReturnValue(callbackInfo, ToV8(impl, callbackInfo.Holder(), callbackInfo.GetIsolate()));
}
+template <class CallbackInfo>
+inline void v8SetReturnValue(const CallbackInfo& callbackInfo, {{cpp_class}}& impl, v8::Local<v8::Object> creationContext) {
+ v8SetReturnValue(callbackInfo, ToV8(impl, creationContext, callbackInfo.GetIsolate()));
+}
+
template <>
struct NativeValueTraits<{{cpp_class}}> {
static {{cpp_class}} nativeValue(v8::Isolate*, v8::Local<v8::Value>, ExceptionState&);

Powered by Google App Engine
This is Rietveld 408576698