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 "V8TestInterfaceConstructor.h" | 8 #include "V8TestInterfaceConstructor.h" |
9 | 9 |
10 #include "bindings/core/v8/Dictionary.h" | 10 #include "bindings/core/v8/Dictionary.h" |
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
337 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, v8Valu
e); | 337 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, v8Valu
e); |
338 } | 338 } |
339 | 339 |
340 v8::Handle<v8::Object> V8TestInterfaceConstructor::findInstanceInPrototypeChain(
v8::Handle<v8::Value> v8Value, v8::Isolate* isolate) | 340 v8::Handle<v8::Object> V8TestInterfaceConstructor::findInstanceInPrototypeChain(
v8::Handle<v8::Value> v8Value, v8::Isolate* isolate) |
341 { | 341 { |
342 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe
rTypeInfo, v8Value); | 342 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe
rTypeInfo, v8Value); |
343 } | 343 } |
344 | 344 |
345 TestInterfaceConstructor* V8TestInterfaceConstructor::toNativeWithTypeCheck(v8::
Isolate* isolate, v8::Handle<v8::Value> value) | 345 TestInterfaceConstructor* V8TestInterfaceConstructor::toNativeWithTypeCheck(v8::
Isolate* isolate, v8::Handle<v8::Value> value) |
346 { | 346 { |
347 return hasInstance(value, isolate) ? fromInternalPointer(v8::Handle<v8::Obje
ct>::Cast(value)->GetAlignedPointerFromInternalField(v8DOMWrapperObjectIndex)) :
0; | 347 return hasInstance(value, isolate) ? fromInternalPointer(blink::toInternalPo
inter(v8::Handle<v8::Object>::Cast(value))) : 0; |
348 } | 348 } |
349 | 349 |
350 v8::Handle<v8::Object> wrap(TestInterfaceConstructor* impl, v8::Handle<v8::Objec
t> creationContext, v8::Isolate* isolate) | 350 v8::Handle<v8::Object> wrap(TestInterfaceConstructor* impl, v8::Handle<v8::Objec
t> creationContext, v8::Isolate* isolate) |
351 { | 351 { |
352 ASSERT(impl); | 352 ASSERT(impl); |
353 ASSERT(!DOMDataStore::containsWrapper<V8TestInterfaceConstructor>(impl, isol
ate)); | 353 ASSERT(!DOMDataStore::containsWrapper<V8TestInterfaceConstructor>(impl, isol
ate)); |
354 return V8TestInterfaceConstructor::createWrapper(impl, creationContext, isol
ate); | 354 return V8TestInterfaceConstructor::createWrapper(impl, creationContext, isol
ate); |
355 } | 355 } |
356 | 356 |
357 v8::Handle<v8::Object> V8TestInterfaceConstructor::createWrapper(PassRefPtr<Test
InterfaceConstructor> impl, v8::Handle<v8::Object> creationContext, v8::Isolate*
isolate) | 357 v8::Handle<v8::Object> V8TestInterfaceConstructor::createWrapper(PassRefPtr<Test
InterfaceConstructor> impl, v8::Handle<v8::Object> creationContext, v8::Isolate*
isolate) |
358 { | 358 { |
359 ASSERT(impl); | 359 ASSERT(impl); |
360 ASSERT(!DOMDataStore::containsWrapper<V8TestInterfaceConstructor>(impl.get()
, isolate)); | 360 ASSERT(!DOMDataStore::containsWrapper<V8TestInterfaceConstructor>(impl.get()
, isolate)); |
361 if (ScriptWrappable::wrapperCanBeStoredInObject(impl.get())) { | 361 if (ScriptWrappable::wrapperCanBeStoredInObject(impl.get())) { |
362 const WrapperTypeInfo* actualInfo = ScriptWrappable::fromObject(impl.get
())->typeInfo(); | 362 const WrapperTypeInfo* actualInfo = ScriptWrappable::fromObject(impl.get
())->typeInfo(); |
363 // Might be a XXXConstructor::wrapperTypeInfo instead of an XXX::wrapper
TypeInfo. These will both have | 363 // Might be a XXXConstructor::wrapperTypeInfo instead of an XXX::wrapper
TypeInfo. These will both have |
364 // the same object de-ref functions, though, so use that as the basis of
the check. | 364 // the same object de-ref functions, though, so use that as the basis of
the check. |
365 RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(actualInfo->derefObjectFunction
== wrapperTypeInfo.derefObjectFunction); | 365 RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(actualInfo->derefObjectFunction
== wrapperTypeInfo.derefObjectFunction); |
366 } | 366 } |
367 | 367 |
368 v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext
, &wrapperTypeInfo, toInternalPointer(impl.get()), isolate); | 368 v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext
, &wrapperTypeInfo, toInternalPointer(impl.get()), isolate); |
369 if (UNLIKELY(wrapper.IsEmpty())) | 369 if (UNLIKELY(wrapper.IsEmpty())) |
370 return wrapper; | 370 return wrapper; |
371 | 371 |
372 installPerContextEnabledProperties(wrapper, impl.get(), isolate); | 372 installPerContextEnabledProperties(wrapper, impl.get(), isolate); |
373 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceConstructor>(impl, &
wrapperTypeInfo, wrapper, isolate, WrapperConfiguration::Independent); | 373 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceConstructor>(impl, &
wrapperTypeInfo, wrapper, isolate, WrapperConfiguration::Independent); |
374 return wrapper; | 374 return wrapper; |
375 } | 375 } |
376 | 376 |
377 void V8TestInterfaceConstructor::derefObject(void* object) | 377 void V8TestInterfaceConstructor::derefObject(ScriptWrappableBase* internalPointe
r) |
378 { | 378 { |
379 fromInternalPointer(object)->deref(); | 379 fromInternalPointer(internalPointer)->deref(); |
380 } | 380 } |
381 | 381 |
382 template<> | 382 template<> |
383 v8::Handle<v8::Value> toV8NoInline(TestInterfaceConstructor* impl, v8::Handle<v8
::Object> creationContext, v8::Isolate* isolate) | 383 v8::Handle<v8::Value> toV8NoInline(TestInterfaceConstructor* impl, v8::Handle<v8
::Object> creationContext, v8::Isolate* isolate) |
384 { | 384 { |
385 return toV8(impl, creationContext, isolate); | 385 return toV8(impl, creationContext, isolate); |
386 } | 386 } |
387 | 387 |
388 } // namespace blink | 388 } // namespace blink |
OLD | NEW |