OLD | NEW |
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. DO NOT MODIFY! | 5 // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY! |
6 | 6 |
7 #ifndef V8TestObject_h | 7 #ifndef V8TestObject_h |
8 #define V8TestObject_h | 8 #define V8TestObject_h |
9 | 9 |
10 #include "bindings/core/v8/ScriptWrappable.h" | 10 #include "bindings/core/v8/ScriptWrappable.h" |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 | 89 |
90 v8::Handle<v8::Object> wrap(TestObject* impl, v8::Handle<v8::Object> creationCon
text, v8::Isolate*); | 90 v8::Handle<v8::Object> wrap(TestObject* impl, v8::Handle<v8::Object> creationCon
text, v8::Isolate*); |
91 | 91 |
92 inline v8::Handle<v8::Value> toV8(TestObject* impl, v8::Handle<v8::Object> creat
ionContext, v8::Isolate* isolate) | 92 inline v8::Handle<v8::Value> toV8(TestObject* impl, v8::Handle<v8::Object> creat
ionContext, v8::Isolate* isolate) |
93 { | 93 { |
94 if (UNLIKELY(!impl)) | 94 if (UNLIKELY(!impl)) |
95 return v8::Null(isolate); | 95 return v8::Null(isolate); |
96 v8::Handle<v8::Value> wrapper = DOMDataStore::getWrapper<V8TestObject>(impl,
isolate); | 96 v8::Handle<v8::Value> wrapper = DOMDataStore::getWrapper<V8TestObject>(impl,
isolate); |
97 if (!wrapper.IsEmpty()) | 97 if (!wrapper.IsEmpty()) |
98 return wrapper; | 98 return wrapper; |
99 return wrap(impl, creationContext, isolate); | 99 |
| 100 return impl->wrap(creationContext, isolate); |
100 } | 101 } |
101 | 102 |
102 template<typename CallbackInfo> | 103 template<typename CallbackInfo> |
103 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, TestObject* impl) | 104 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, TestObject* impl) |
104 { | 105 { |
105 if (UNLIKELY(!impl)) { | 106 if (UNLIKELY(!impl)) { |
106 v8SetReturnValueNull(callbackInfo); | 107 v8SetReturnValueNull(callbackInfo); |
107 return; | 108 return; |
108 } | 109 } |
109 if (DOMDataStore::setReturnValueFromWrapper<V8TestObject>(callbackInfo.GetRe
turnValue(), impl)) | 110 if (DOMDataStore::setReturnValueFromWrapper<V8TestObject>(callbackInfo.GetRe
turnValue(), impl)) |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 } | 158 } |
158 | 159 |
159 template<class CallbackInfo, class Wrappable> | 160 template<class CallbackInfo, class Wrappable> |
160 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, PassRefPtr<Te
stObject> impl, Wrappable* wrappable) | 161 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, PassRefPtr<Te
stObject> impl, Wrappable* wrappable) |
161 { | 162 { |
162 v8SetReturnValueFast(callbackInfo, impl.get(), wrappable); | 163 v8SetReturnValueFast(callbackInfo, impl.get(), wrappable); |
163 } | 164 } |
164 | 165 |
165 } // namespace blink | 166 } // namespace blink |
166 #endif // V8TestObject_h | 167 #endif // V8TestObject_h |
OLD | NEW |