OLD | NEW |
1 /* | 1 /* |
2 This file is part of the Blink open source project. | 2 This file is part of the Blink open source project. |
3 This file has been auto-generated by CodeGeneratorV8.pm. DO NOT MODIFY! | 3 This file has been auto-generated by CodeGeneratorV8.pm. DO NOT MODIFY! |
4 | 4 |
5 This library is free software; you can redistribute it and/or | 5 This library is free software; you can redistribute it and/or |
6 modify it under the terms of the GNU Library General Public | 6 modify it under the terms of the GNU Library General Public |
7 License as published by the Free Software Foundation; either | 7 License as published by the Free Software Foundation; either |
8 version 2 of the License, or (at your option) any later version. | 8 version 2 of the License, or (at your option) any later version. |
9 | 9 |
10 This library is distributed in the hope that it will be useful, | 10 This library is distributed in the hope that it will be useful, |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 inline v8::Handle<v8::Value> toV8(TestObj* impl, v8::Handle<v8::Object> creation
Context, v8::Isolate* isolate) | 82 inline v8::Handle<v8::Value> toV8(TestObj* impl, v8::Handle<v8::Object> creation
Context, v8::Isolate* isolate) |
83 { | 83 { |
84 if (UNLIKELY(!impl)) | 84 if (UNLIKELY(!impl)) |
85 return v8NullWithCheck(isolate); | 85 return v8NullWithCheck(isolate); |
86 v8::Handle<v8::Value> wrapper = DOMDataStore::getWrapper<V8TestObject>(impl,
isolate); | 86 v8::Handle<v8::Value> wrapper = DOMDataStore::getWrapper<V8TestObject>(impl,
isolate); |
87 if (!wrapper.IsEmpty()) | 87 if (!wrapper.IsEmpty()) |
88 return wrapper; | 88 return wrapper; |
89 return wrap(impl, creationContext, isolate); | 89 return wrap(impl, creationContext, isolate); |
90 } | 90 } |
91 | 91 |
| 92 inline UnsafePersistent<v8::Object> toV8Persistent(TestObj* impl, v8::Handle<v8:
:Object> creationContext, v8::Isolate* isolate) |
| 93 { |
| 94 ASSERT(impl); |
| 95 |
| 96 UnsafePersistent<v8::Object> wrapperPersistent = DOMDataStore::getWrapperPer
sistent<V8TestObject>(impl, isolate); |
| 97 if (LIKELY(!wrapperPersistent.isEmpty())) |
| 98 return wrapperPersistent; |
| 99 |
| 100 wrap(impl, creationContext, isolate); |
| 101 |
| 102 wrapperPersistent = DOMDataStore::getWrapperPersistent<V8TestObject>(impl, i
solate); |
| 103 ASSERT(!wrapperPersistent.isEmpty()); |
| 104 return wrapperPersistent; |
| 105 } |
| 106 |
92 template<typename CallbackInfo> | 107 template<typename CallbackInfo> |
93 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, TestObj* impl, v8
::Handle<v8::Object> creationContext) | 108 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, TestObj* impl, v8
::Handle<v8::Object> creationContext) |
94 { | 109 { |
95 if (UNLIKELY(!impl)) { | 110 if (UNLIKELY(!impl)) { |
96 v8SetReturnValueNull(callbackInfo); | 111 v8SetReturnValueNull(callbackInfo); |
97 return; | 112 return; |
98 } | 113 } |
99 if (DOMDataStore::setReturnValueFromWrapper<V8TestObject>(callbackInfo.GetRe
turnValue(), impl)) | 114 if (DOMDataStore::setReturnValueFromWrapper<V8TestObject>(callbackInfo.GetRe
turnValue(), impl)) |
100 return; | 115 return; |
101 v8::Handle<v8::Object> wrapper = wrap(impl, creationContext, callbackInfo.Ge
tIsolate()); | 116 v8::Handle<v8::Object> wrapper = wrap(impl, creationContext, callbackInfo.Ge
tIsolate()); |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 | 163 |
149 template<class CallbackInfo, class Wrappable> | 164 template<class CallbackInfo, class Wrappable> |
150 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, PassRefPtr<Te
stObj > impl, Wrappable* wrappable) | 165 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, PassRefPtr<Te
stObj > impl, Wrappable* wrappable) |
151 { | 166 { |
152 v8SetReturnValueFast(callbackInfo, impl.get(), wrappable); | 167 v8SetReturnValueFast(callbackInfo, impl.get(), wrappable); |
153 } | 168 } |
154 | 169 |
155 } | 170 } |
156 | 171 |
157 #endif // V8TestObject_h | 172 #endif // V8TestObject_h |
OLD | NEW |