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 "V8TestInterfaceConstructor2.h" | 8 #include "V8TestInterfaceConstructor2.h" |
9 | 9 |
10 #include "bindings/core/v8/Dictionary.h" | 10 #include "bindings/core/v8/Dictionary.h" |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 v8::Handle<v8::Object> V8TestInterfaceConstructor2::findInstanceInPrototypeChain
(v8::Handle<v8::Value> v8Value, v8::Isolate* isolate) | 222 v8::Handle<v8::Object> V8TestInterfaceConstructor2::findInstanceInPrototypeChain
(v8::Handle<v8::Value> v8Value, v8::Isolate* isolate) |
223 { | 223 { |
224 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe
rTypeInfo, v8Value); | 224 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe
rTypeInfo, v8Value); |
225 } | 225 } |
226 | 226 |
227 TestInterfaceConstructor2* V8TestInterfaceConstructor2::toNativeWithTypeCheck(v8
::Isolate* isolate, v8::Handle<v8::Value> value) | 227 TestInterfaceConstructor2* V8TestInterfaceConstructor2::toNativeWithTypeCheck(v8
::Isolate* isolate, v8::Handle<v8::Value> value) |
228 { | 228 { |
229 return hasInstance(value, isolate) ? fromInternalPointer(blink::toInternalPo
inter(v8::Handle<v8::Object>::Cast(value))) : 0; | 229 return hasInstance(value, isolate) ? fromInternalPointer(blink::toInternalPo
inter(v8::Handle<v8::Object>::Cast(value))) : 0; |
230 } | 230 } |
231 | 231 |
232 v8::Handle<v8::Object> wrap(TestInterfaceConstructor2* impl, v8::Handle<v8::Obje
ct> creationContext, v8::Isolate* isolate) | |
233 { | |
234 ASSERT(impl); | |
235 ASSERT(!DOMDataStore::containsWrapper<V8TestInterfaceConstructor2>(impl, iso
late)); | |
236 return V8TestInterfaceConstructor2::createWrapper(impl, creationContext, iso
late); | |
237 } | |
238 | |
239 v8::Handle<v8::Object> V8TestInterfaceConstructor2::createWrapper(PassRefPtr<Tes
tInterfaceConstructor2> impl, v8::Handle<v8::Object> creationContext, v8::Isolat
e* isolate) | |
240 { | |
241 ASSERT(impl); | |
242 ASSERT(!DOMDataStore::containsWrapper<V8TestInterfaceConstructor2>(impl.get(
), isolate)); | |
243 const WrapperTypeInfo* actualInfo = impl->typeInfo(); | |
244 // Might be a XXXConstructor::wrapperTypeInfo instead of an XXX::wrapperType
Info. These will both have | |
245 // the same object de-ref functions, though, so use that as the basis of the
check. | |
246 RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(actualInfo->derefObjectFunction ==
wrapperTypeInfo.derefObjectFunction); | |
247 | |
248 v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext
, &wrapperTypeInfo, toInternalPointer(impl.get()), isolate); | |
249 if (UNLIKELY(wrapper.IsEmpty())) | |
250 return wrapper; | |
251 | |
252 installConditionallyEnabledProperties(wrapper, isolate); | |
253 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceConstructor2>(impl,
&wrapperTypeInfo, wrapper, isolate); | |
254 return wrapper; | |
255 } | |
256 | |
257 | 232 |
258 void V8TestInterfaceConstructor2::refObject(ScriptWrappableBase* internalPointer
) | 233 void V8TestInterfaceConstructor2::refObject(ScriptWrappableBase* internalPointer
) |
259 { | 234 { |
260 fromInternalPointer(internalPointer)->ref(); | 235 fromInternalPointer(internalPointer)->ref(); |
261 } | 236 } |
262 | 237 |
263 void V8TestInterfaceConstructor2::derefObject(ScriptWrappableBase* internalPoint
er) | 238 void V8TestInterfaceConstructor2::derefObject(ScriptWrappableBase* internalPoint
er) |
264 { | 239 { |
265 fromInternalPointer(internalPointer)->deref(); | 240 fromInternalPointer(internalPointer)->deref(); |
266 } | 241 } |
267 | 242 |
268 WrapperPersistentNode* V8TestInterfaceConstructor2::createPersistentHandle(Scrip
tWrappableBase* internalPointer) | 243 WrapperPersistentNode* V8TestInterfaceConstructor2::createPersistentHandle(Scrip
tWrappableBase* internalPointer) |
269 { | 244 { |
270 ASSERT_NOT_REACHED(); | 245 ASSERT_NOT_REACHED(); |
271 return 0; | 246 return 0; |
272 } | 247 } |
273 | 248 |
274 template<> | 249 template<> |
275 v8::Handle<v8::Value> toV8NoInline(TestInterfaceConstructor2* impl, v8::Handle<v
8::Object> creationContext, v8::Isolate* isolate) | 250 v8::Handle<v8::Value> toV8NoInline(TestInterfaceConstructor2* impl, v8::Handle<v
8::Object> creationContext, v8::Isolate* isolate) |
276 { | 251 { |
277 return toV8(impl, creationContext, isolate); | 252 return toV8(impl, creationContext, isolate); |
278 } | 253 } |
279 | 254 |
280 } // namespace blink | 255 } // namespace blink |
OLD | NEW |