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 #include "config.h" | 7 #include "config.h" |
8 #include "V8TestInterfaceNamedConstructor.h" | 8 #include "V8TestInterfaceNamedConstructor.h" |
9 | 9 |
10 #include "bindings/core/v8/ExceptionState.h" | 10 #include "bindings/core/v8/ExceptionState.h" |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 TestInterfaceNamedConstructor* V8TestInterfaceNamedConstructor::toNativeWithType
Check(v8::Isolate* isolate, v8::Handle<v8::Value> value) | 188 TestInterfaceNamedConstructor* V8TestInterfaceNamedConstructor::toNativeWithType
Check(v8::Isolate* isolate, v8::Handle<v8::Value> value) |
189 { | 189 { |
190 return hasInstance(value, isolate) ? fromInternalPointer(blink::toInternalPo
inter(v8::Handle<v8::Object>::Cast(value))) : 0; | 190 return hasInstance(value, isolate) ? fromInternalPointer(blink::toInternalPo
inter(v8::Handle<v8::Object>::Cast(value))) : 0; |
191 } | 191 } |
192 | 192 |
193 ActiveDOMObject* V8TestInterfaceNamedConstructor::toActiveDOMObject(v8::Handle<v
8::Object> wrapper) | 193 ActiveDOMObject* V8TestInterfaceNamedConstructor::toActiveDOMObject(v8::Handle<v
8::Object> wrapper) |
194 { | 194 { |
195 return toNative(wrapper); | 195 return toNative(wrapper); |
196 } | 196 } |
197 | 197 |
198 v8::Handle<v8::Object> wrap(TestInterfaceNamedConstructor* impl, v8::Handle<v8::
Object> creationContext, v8::Isolate* isolate) | |
199 { | |
200 ASSERT(impl); | |
201 ASSERT(!DOMDataStore::containsWrapper<V8TestInterfaceNamedConstructor>(impl,
isolate)); | |
202 return V8TestInterfaceNamedConstructor::createWrapper(impl, creationContext,
isolate); | |
203 } | |
204 | |
205 v8::Handle<v8::Object> V8TestInterfaceNamedConstructor::createWrapper(PassRefPtr
<TestInterfaceNamedConstructor> impl, v8::Handle<v8::Object> creationContext, v8
::Isolate* isolate) | |
206 { | |
207 ASSERT(impl); | |
208 ASSERT(!DOMDataStore::containsWrapper<V8TestInterfaceNamedConstructor>(impl.
get(), isolate)); | |
209 const WrapperTypeInfo* actualInfo = impl->typeInfo(); | |
210 // Might be a XXXConstructor::wrapperTypeInfo instead of an XXX::wrapperType
Info. These will both have | |
211 // the same object de-ref functions, though, so use that as the basis of the
check. | |
212 RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(actualInfo->derefObjectFunction ==
wrapperTypeInfo.derefObjectFunction); | |
213 | |
214 v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext
, &wrapperTypeInfo, toInternalPointer(impl.get()), isolate); | |
215 if (UNLIKELY(wrapper.IsEmpty())) | |
216 return wrapper; | |
217 | |
218 installConditionallyEnabledProperties(wrapper, isolate); | |
219 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceNamedConstructor>(im
pl, &wrapperTypeInfo, wrapper, isolate); | |
220 return wrapper; | |
221 } | |
222 | |
223 | 198 |
224 void V8TestInterfaceNamedConstructor::refObject(ScriptWrappableBase* internalPoi
nter) | 199 void V8TestInterfaceNamedConstructor::refObject(ScriptWrappableBase* internalPoi
nter) |
225 { | 200 { |
226 fromInternalPointer(internalPointer)->ref(); | 201 fromInternalPointer(internalPointer)->ref(); |
227 } | 202 } |
228 | 203 |
229 void V8TestInterfaceNamedConstructor::derefObject(ScriptWrappableBase* internalP
ointer) | 204 void V8TestInterfaceNamedConstructor::derefObject(ScriptWrappableBase* internalP
ointer) |
230 { | 205 { |
231 fromInternalPointer(internalPointer)->deref(); | 206 fromInternalPointer(internalPointer)->deref(); |
232 } | 207 } |
233 | 208 |
234 WrapperPersistentNode* V8TestInterfaceNamedConstructor::createPersistentHandle(S
criptWrappableBase* internalPointer) | 209 WrapperPersistentNode* V8TestInterfaceNamedConstructor::createPersistentHandle(S
criptWrappableBase* internalPointer) |
235 { | 210 { |
236 ASSERT_NOT_REACHED(); | 211 ASSERT_NOT_REACHED(); |
237 return 0; | 212 return 0; |
238 } | 213 } |
239 | 214 |
240 template<> | 215 template<> |
241 v8::Handle<v8::Value> toV8NoInline(TestInterfaceNamedConstructor* impl, v8::Hand
le<v8::Object> creationContext, v8::Isolate* isolate) | 216 v8::Handle<v8::Value> toV8NoInline(TestInterfaceNamedConstructor* impl, v8::Hand
le<v8::Object> creationContext, v8::Isolate* isolate) |
242 { | 217 { |
243 return toV8(impl, creationContext, isolate); | 218 return toV8(impl, creationContext, isolate); |
244 } | 219 } |
245 | 220 |
246 } // namespace blink | 221 } // namespace blink |
OLD | NEW |