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

Side by Side Diff: third_party/WebKit/Source/bindings/tests/results/modules/BooleanOrString.h

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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/bindings/tests/results/core/V8TestPermissiveDictionary.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This file has been auto-generated by code_generator_v8.py. 5 // This file has been auto-generated by code_generator_v8.py.
6 // DO NOT MODIFY! 6 // DO NOT MODIFY!
7 7
8 // This file has been generated from the Jinja2 template in 8 // This file has been generated from the Jinja2 template in
9 // third_party/WebKit/Source/bindings/templates/union_container.h.tmpl 9 // third_party/WebKit/Source/bindings/templates/union_container.h.tmpl
10 10
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 MODULES_EXPORT static void toImpl(v8::Isolate*, v8::Local<v8::Value>, BooleanO rString&, UnionTypeConversionMode, ExceptionState&); 60 MODULES_EXPORT static void toImpl(v8::Isolate*, v8::Local<v8::Value>, BooleanO rString&, UnionTypeConversionMode, ExceptionState&);
61 }; 61 };
62 62
63 MODULES_EXPORT v8::Local<v8::Value> ToV8(const BooleanOrString&, v8::Local<v8::O bject>, v8::Isolate*); 63 MODULES_EXPORT v8::Local<v8::Value> ToV8(const BooleanOrString&, v8::Local<v8::O bject>, v8::Isolate*);
64 64
65 template <class CallbackInfo> 65 template <class CallbackInfo>
66 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, BooleanOrString& impl) { 66 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, BooleanOrString& impl) {
67 v8SetReturnValue(callbackInfo, ToV8(impl, callbackInfo.Holder(), callbackInfo. GetIsolate())); 67 v8SetReturnValue(callbackInfo, ToV8(impl, callbackInfo.Holder(), callbackInfo. GetIsolate()));
68 } 68 }
69 69
70 template <class CallbackInfo>
71 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, BooleanOrString& impl, v8::Local<v8::Object> creationContext) {
72 v8SetReturnValue(callbackInfo, ToV8(impl, creationContext, callbackInfo.GetIso late()));
73 }
74
70 template <> 75 template <>
71 struct NativeValueTraits<BooleanOrString> { 76 struct NativeValueTraits<BooleanOrString> {
72 MODULES_EXPORT static BooleanOrString nativeValue(v8::Isolate*, v8::Local<v8:: Value>, ExceptionState&); 77 MODULES_EXPORT static BooleanOrString nativeValue(v8::Isolate*, v8::Local<v8:: Value>, ExceptionState&);
73 }; 78 };
74 79
75 } // namespace blink 80 } // namespace blink
76 81
77 // We need to set canInitializeWithMemset=true because HeapVector supports 82 // We need to set canInitializeWithMemset=true because HeapVector supports
78 // items that can initialize with memset or have a vtable. It is safe to 83 // items that can initialize with memset or have a vtable. It is safe to
79 // set canInitializeWithMemset=true for a union type object in practice. 84 // set canInitializeWithMemset=true for a union type object in practice.
80 // See https://codereview.chromium.org/1118993002/#msg5 for more details. 85 // See https://codereview.chromium.org/1118993002/#msg5 for more details.
81 WTF_ALLOW_MOVE_AND_INIT_WITH_MEM_FUNCTIONS(blink::BooleanOrString); 86 WTF_ALLOW_MOVE_AND_INIT_WITH_MEM_FUNCTIONS(blink::BooleanOrString);
82 87
83 #endif // BooleanOrString_h 88 #endif // BooleanOrString_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/bindings/tests/results/core/V8TestPermissiveDictionary.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698