| 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 "V8TestInterfaceEmpty.h" | 8 #include "V8TestInterfaceEmpty.h" |
| 9 | 9 |
| 10 #include "bindings/core/v8/ExceptionState.h" | 10 #include "bindings/core/v8/ExceptionState.h" |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 v8::Handle<v8::Object> V8TestInterfaceEmpty::findInstanceInPrototypeChain(v8::Ha
ndle<v8::Value> v8Value, v8::Isolate* isolate) | 77 v8::Handle<v8::Object> V8TestInterfaceEmpty::findInstanceInPrototypeChain(v8::Ha
ndle<v8::Value> v8Value, v8::Isolate* isolate) |
| 78 { | 78 { |
| 79 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe
rTypeInfo, v8Value); | 79 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe
rTypeInfo, v8Value); |
| 80 } | 80 } |
| 81 | 81 |
| 82 TestInterfaceEmpty* V8TestInterfaceEmpty::toNativeWithTypeCheck(v8::Isolate* iso
late, v8::Handle<v8::Value> value) | 82 TestInterfaceEmpty* V8TestInterfaceEmpty::toNativeWithTypeCheck(v8::Isolate* iso
late, v8::Handle<v8::Value> value) |
| 83 { | 83 { |
| 84 return hasInstance(value, isolate) ? fromInternalPointer(blink::toInternalPo
inter(v8::Handle<v8::Object>::Cast(value))) : 0; | 84 return hasInstance(value, isolate) ? fromInternalPointer(blink::toInternalPo
inter(v8::Handle<v8::Object>::Cast(value))) : 0; |
| 85 } | 85 } |
| 86 | 86 |
| 87 v8::Handle<v8::Object> wrap(TestInterfaceEmpty* impl, v8::Handle<v8::Object> cre
ationContext, v8::Isolate* isolate) | |
| 88 { | |
| 89 ASSERT(impl); | |
| 90 ASSERT(!DOMDataStore::containsWrapper<V8TestInterfaceEmpty>(impl, isolate)); | |
| 91 return V8TestInterfaceEmpty::createWrapper(impl, creationContext, isolate); | |
| 92 } | |
| 93 | |
| 94 v8::Handle<v8::Object> V8TestInterfaceEmpty::createWrapper(PassRefPtr<TestInterf
aceEmpty> impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate) | |
| 95 { | |
| 96 ASSERT(impl); | |
| 97 ASSERT(!DOMDataStore::containsWrapper<V8TestInterfaceEmpty>(impl.get(), isol
ate)); | |
| 98 const WrapperTypeInfo* actualInfo = impl->typeInfo(); | |
| 99 // Might be a XXXConstructor::wrapperTypeInfo instead of an XXX::wrapperType
Info. These will both have | |
| 100 // the same object de-ref functions, though, so use that as the basis of the
check. | |
| 101 RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(actualInfo->derefObjectFunction ==
wrapperTypeInfo.derefObjectFunction); | |
| 102 | |
| 103 v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext
, &wrapperTypeInfo, toInternalPointer(impl.get()), isolate); | |
| 104 if (UNLIKELY(wrapper.IsEmpty())) | |
| 105 return wrapper; | |
| 106 | |
| 107 installConditionallyEnabledProperties(wrapper, isolate); | |
| 108 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceEmpty>(impl, &wrappe
rTypeInfo, wrapper, isolate); | |
| 109 return wrapper; | |
| 110 } | |
| 111 | |
| 112 | 87 |
| 113 void V8TestInterfaceEmpty::refObject(ScriptWrappableBase* internalPointer) | 88 void V8TestInterfaceEmpty::refObject(ScriptWrappableBase* internalPointer) |
| 114 { | 89 { |
| 115 fromInternalPointer(internalPointer)->ref(); | 90 fromInternalPointer(internalPointer)->ref(); |
| 116 } | 91 } |
| 117 | 92 |
| 118 void V8TestInterfaceEmpty::derefObject(ScriptWrappableBase* internalPointer) | 93 void V8TestInterfaceEmpty::derefObject(ScriptWrappableBase* internalPointer) |
| 119 { | 94 { |
| 120 fromInternalPointer(internalPointer)->deref(); | 95 fromInternalPointer(internalPointer)->deref(); |
| 121 } | 96 } |
| 122 | 97 |
| 123 PersistentNode* V8TestInterfaceEmpty::createPersistentHandle(ScriptWrappableBase
* internalPointer) | 98 PersistentNode* V8TestInterfaceEmpty::createPersistentHandle(ScriptWrappableBase
* internalPointer) |
| 124 { | 99 { |
| 125 ASSERT_NOT_REACHED(); | 100 ASSERT_NOT_REACHED(); |
| 126 return 0; | 101 return 0; |
| 127 } | 102 } |
| 128 | 103 |
| 129 template<> | 104 template<> |
| 130 v8::Handle<v8::Value> toV8NoInline(TestInterfaceEmpty* impl, v8::Handle<v8::Obje
ct> creationContext, v8::Isolate* isolate) | 105 v8::Handle<v8::Value> toV8NoInline(TestInterfaceEmpty* impl, v8::Handle<v8::Obje
ct> creationContext, v8::Isolate* isolate) |
| 131 { | 106 { |
| 132 return toV8(impl, creationContext, isolate); | 107 return toV8(impl, creationContext, isolate); |
| 133 } | 108 } |
| 134 | 109 |
| 135 } // namespace blink | 110 } // namespace blink |
| OLD | NEW |