| 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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 { | 90 { |
| 91 if (UNLIKELY(!impl)) | 91 if (UNLIKELY(!impl)) |
| 92 return v8NullWithCheck(isolate); | 92 return v8NullWithCheck(isolate); |
| 93 v8::Handle<v8::Value> wrapper = DOMDataStore::getWrapper<{{v8_class_name}}>(
impl, isolate); | 93 v8::Handle<v8::Value> wrapper = DOMDataStore::getWrapper<{{v8_class_name}}>(
impl, isolate); |
| 94 if (!wrapper.IsEmpty()) | 94 if (!wrapper.IsEmpty()) |
| 95 return wrapper; | 95 return wrapper; |
| 96 return wrap(impl, creationContext, isolate); | 96 return wrap(impl, creationContext, isolate); |
| 97 } | 97 } |
| 98 | 98 |
| 99 template<typename CallbackInfo> | 99 template<typename CallbackInfo> |
| 100 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, {{cpp_class_name}
}* impl, v8::Handle<v8::Object> creationContext) | 100 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, {{cpp_class_name}
}* impl) |
| 101 { | 101 { |
| 102 if (UNLIKELY(!impl)) { | 102 if (UNLIKELY(!impl)) { |
| 103 v8SetReturnValueNull(callbackInfo); | 103 v8SetReturnValueNull(callbackInfo); |
| 104 return; | 104 return; |
| 105 } | 105 } |
| 106 if (DOMDataStore::setReturnValueFromWrapper<{{v8_class_name}}>(callbackInfo.
GetReturnValue(), impl)) | 106 if (DOMDataStore::setReturnValueFromWrapper<{{v8_class_name}}>(callbackInfo.
GetReturnValue(), impl)) |
| 107 return; | 107 return; |
| 108 v8::Handle<v8::Object> wrapper = wrap(impl, creationContext, callbackInfo.Ge
tIsolate()); | 108 v8::Handle<v8::Object> wrapper = wrap(impl, callbackInfo.Holder(), callbackI
nfo.GetIsolate()); |
| 109 v8SetReturnValue(callbackInfo, wrapper); | 109 v8SetReturnValue(callbackInfo, wrapper); |
| 110 } | 110 } |
| 111 | 111 |
| 112 template<typename CallbackInfo> | 112 template<typename CallbackInfo> |
| 113 inline void v8SetReturnValueForMainWorld(const CallbackInfo& callbackInfo, {{cpp
_class_name}}* impl, v8::Handle<v8::Object> creationContext) | 113 inline void v8SetReturnValueForMainWorld(const CallbackInfo& callbackInfo, {{cpp
_class_name}}* impl) |
| 114 { | 114 { |
| 115 ASSERT(worldType(callbackInfo.GetIsolate()) == MainWorld); | 115 ASSERT(worldType(callbackInfo.GetIsolate()) == MainWorld); |
| 116 if (UNLIKELY(!impl)) { | 116 if (UNLIKELY(!impl)) { |
| 117 v8SetReturnValueNull(callbackInfo); | 117 v8SetReturnValueNull(callbackInfo); |
| 118 return; | 118 return; |
| 119 } | 119 } |
| 120 if (DOMDataStore::setReturnValueFromWrapperForMainWorld<{{v8_class_name}}>(c
allbackInfo.GetReturnValue(), impl)) | 120 if (DOMDataStore::setReturnValueFromWrapperForMainWorld<{{v8_class_name}}>(c
allbackInfo.GetReturnValue(), impl)) |
| 121 return; | 121 return; |
| 122 v8::Handle<v8::Value> wrapper = wrap(impl, creationContext, callbackInfo.Get
Isolate()); | 122 v8::Handle<v8::Value> wrapper = wrap(impl, callbackInfo.Holder(), callbackIn
fo.GetIsolate()); |
| 123 v8SetReturnValue(callbackInfo, wrapper); | 123 v8SetReturnValue(callbackInfo, wrapper); |
| 124 } | 124 } |
| 125 | 125 |
| 126 template<class CallbackInfo, class Wrappable> | 126 template<class CallbackInfo, class Wrappable> |
| 127 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, {{cpp_class_n
ame}}* impl, Wrappable* wrappable) | 127 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, {{cpp_class_n
ame}}* impl, Wrappable* wrappable) |
| 128 { | 128 { |
| 129 if (UNLIKELY(!impl)) { | 129 if (UNLIKELY(!impl)) { |
| 130 v8SetReturnValueNull(callbackInfo); | 130 v8SetReturnValueNull(callbackInfo); |
| 131 return; | 131 return; |
| 132 } | 132 } |
| 133 if (DOMDataStore::setReturnValueFromWrapperFast<{{v8_class_name}}>(callbackI
nfo.GetReturnValue(), impl, callbackInfo.Holder(), wrappable)) | 133 if (DOMDataStore::setReturnValueFromWrapperFast<{{v8_class_name}}>(callbackI
nfo.GetReturnValue(), impl, callbackInfo.Holder(), wrappable)) |
| 134 return; | 134 return; |
| 135 v8::Handle<v8::Object> wrapper = wrap(impl, callbackInfo.Holder(), callbackI
nfo.GetIsolate()); | 135 v8::Handle<v8::Object> wrapper = wrap(impl, callbackInfo.Holder(), callbackI
nfo.GetIsolate()); |
| 136 v8SetReturnValue(callbackInfo, wrapper); | 136 v8SetReturnValue(callbackInfo, wrapper); |
| 137 } | 137 } |
| 138 | 138 |
| 139 inline v8::Handle<v8::Value> toV8(PassRefPtr<{{cpp_class_name}} > impl, v8::Hand
le<v8::Object> creationContext, v8::Isolate* isolate) | 139 inline v8::Handle<v8::Value> toV8(PassRefPtr<{{cpp_class_name}} > impl, v8::Hand
le<v8::Object> creationContext, v8::Isolate* isolate) |
| 140 { | 140 { |
| 141 return toV8(impl.get(), creationContext, isolate); | 141 return toV8(impl.get(), creationContext, isolate); |
| 142 } | 142 } |
| 143 | 143 |
| 144 template<class CallbackInfo> | 144 template<class CallbackInfo> |
| 145 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, PassRefPtr<{{cpp_
class_name}} > impl, v8::Handle<v8::Object> creationContext) | 145 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, PassRefPtr<{{cpp_
class_name}} > impl) |
| 146 { | 146 { |
| 147 v8SetReturnValue(callbackInfo, impl.get(), creationContext); | 147 v8SetReturnValue(callbackInfo, impl.get()); |
| 148 } | 148 } |
| 149 | 149 |
| 150 template<class CallbackInfo> | 150 template<class CallbackInfo> |
| 151 inline void v8SetReturnValueForMainWorld(const CallbackInfo& callbackInfo, PassR
efPtr<{{cpp_class_name}} > impl, v8::Handle<v8::Object> creationContext) | 151 inline void v8SetReturnValueForMainWorld(const CallbackInfo& callbackInfo, PassR
efPtr<{{cpp_class_name}} > impl) |
| 152 { | 152 { |
| 153 v8SetReturnValueForMainWorld(callbackInfo, impl.get(), creationContext); | 153 v8SetReturnValueForMainWorld(callbackInfo, impl.get()); |
| 154 } | 154 } |
| 155 | 155 |
| 156 template<class CallbackInfo, class Wrappable> | 156 template<class CallbackInfo, class Wrappable> |
| 157 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, PassRefPtr<{{
cpp_class_name}} > impl, Wrappable* wrappable) | 157 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, PassRefPtr<{{
cpp_class_name}} > impl, Wrappable* wrappable) |
| 158 { | 158 { |
| 159 v8SetReturnValueFast(callbackInfo, impl.get(), wrappable); | 159 v8SetReturnValueFast(callbackInfo, impl.get(), wrappable); |
| 160 } | 160 } |
| 161 | 161 |
| 162 } | 162 } |
| 163 {% if conditional_string %} | 163 {% if conditional_string %} |
| 164 | 164 |
| 165 #endif // {{conditional_string}} | 165 #endif // {{conditional_string}} |
| 166 {% endif %} | 166 {% endif %} |
| 167 | 167 |
| 168 #endif // {{v8_class_name}}_h | 168 #endif // {{v8_class_name}}_h |
| OLD | NEW |