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 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
344 v8::Handle<v8::Object> V8TestInterfaceConstructor::findInstanceInPrototypeChain(
v8::Handle<v8::Value> v8Value, v8::Isolate* isolate) | 344 v8::Handle<v8::Object> V8TestInterfaceConstructor::findInstanceInPrototypeChain(
v8::Handle<v8::Value> v8Value, v8::Isolate* isolate) |
345 { | 345 { |
346 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe
rTypeInfo, v8Value); | 346 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe
rTypeInfo, v8Value); |
347 } | 347 } |
348 | 348 |
349 TestInterfaceConstructor* V8TestInterfaceConstructor::toNativeWithTypeCheck(v8::
Isolate* isolate, v8::Handle<v8::Value> value) | 349 TestInterfaceConstructor* V8TestInterfaceConstructor::toNativeWithTypeCheck(v8::
Isolate* isolate, v8::Handle<v8::Value> value) |
350 { | 350 { |
351 return hasInstance(value, isolate) ? fromInternalPointer(blink::toInternalPo
inter(v8::Handle<v8::Object>::Cast(value))) : 0; | 351 return hasInstance(value, isolate) ? fromInternalPointer(blink::toInternalPo
inter(v8::Handle<v8::Object>::Cast(value))) : 0; |
352 } | 352 } |
353 | 353 |
354 v8::Handle<v8::Object> wrap(TestInterfaceConstructor* impl, v8::Handle<v8::Objec
t> creationContext, v8::Isolate* isolate) | |
355 { | |
356 ASSERT(impl); | |
357 ASSERT(!DOMDataStore::containsWrapper<V8TestInterfaceConstructor>(impl, isol
ate)); | |
358 return V8TestInterfaceConstructor::createWrapper(impl, creationContext, isol
ate); | |
359 } | |
360 | |
361 v8::Handle<v8::Object> V8TestInterfaceConstructor::createWrapper(PassRefPtr<Test
InterfaceConstructor> impl, v8::Handle<v8::Object> creationContext, v8::Isolate*
isolate) | |
362 { | |
363 ASSERT(impl); | |
364 ASSERT(!DOMDataStore::containsWrapper<V8TestInterfaceConstructor>(impl.get()
, isolate)); | |
365 const WrapperTypeInfo* actualInfo = impl->typeInfo(); | |
366 // Might be a XXXConstructor::wrapperTypeInfo instead of an XXX::wrapperType
Info. These will both have | |
367 // the same object de-ref functions, though, so use that as the basis of the
check. | |
368 RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(actualInfo->derefObjectFunction ==
wrapperTypeInfo.derefObjectFunction); | |
369 | |
370 v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext
, &wrapperTypeInfo, toInternalPointer(impl.get()), isolate); | |
371 if (UNLIKELY(wrapper.IsEmpty())) | |
372 return wrapper; | |
373 | |
374 installConditionallyEnabledProperties(wrapper, isolate); | |
375 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceConstructor>(impl, &
wrapperTypeInfo, wrapper, isolate); | |
376 return wrapper; | |
377 } | |
378 | |
379 | 354 |
380 void V8TestInterfaceConstructor::refObject(ScriptWrappableBase* internalPointer) | 355 void V8TestInterfaceConstructor::refObject(ScriptWrappableBase* internalPointer) |
381 { | 356 { |
382 fromInternalPointer(internalPointer)->ref(); | 357 fromInternalPointer(internalPointer)->ref(); |
383 } | 358 } |
384 | 359 |
385 void V8TestInterfaceConstructor::derefObject(ScriptWrappableBase* internalPointe
r) | 360 void V8TestInterfaceConstructor::derefObject(ScriptWrappableBase* internalPointe
r) |
386 { | 361 { |
387 fromInternalPointer(internalPointer)->deref(); | 362 fromInternalPointer(internalPointer)->deref(); |
388 } | 363 } |
389 | 364 |
390 WrapperPersistentNode* V8TestInterfaceConstructor::createPersistentHandle(Script
WrappableBase* internalPointer) | 365 WrapperPersistentNode* V8TestInterfaceConstructor::createPersistentHandle(Script
WrappableBase* internalPointer) |
391 { | 366 { |
392 ASSERT_NOT_REACHED(); | 367 ASSERT_NOT_REACHED(); |
393 return 0; | 368 return 0; |
394 } | 369 } |
395 | 370 |
396 template<> | 371 template<> |
397 v8::Handle<v8::Value> toV8NoInline(TestInterfaceConstructor* impl, v8::Handle<v8
::Object> creationContext, v8::Isolate* isolate) | 372 v8::Handle<v8::Value> toV8NoInline(TestInterfaceConstructor* impl, v8::Handle<v8
::Object> creationContext, v8::Isolate* isolate) |
398 { | 373 { |
399 return toV8(impl, creationContext, isolate); | 374 return toV8(impl, creationContext, isolate); |
400 } | 375 } |
401 | 376 |
402 } // namespace blink | 377 } // namespace blink |
OLD | NEW |