| 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 "V8TestInterfaceNamedConstructor2.h" | 8 #include "V8TestInterfaceNamedConstructor2.h" |
| 9 | 9 |
| 10 #include "bindings/core/v8/ExceptionState.h" | 10 #include "bindings/core/v8/ExceptionState.h" |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 v8::Handle<v8::Object> V8TestInterfaceNamedConstructor2::findInstanceInPrototype
Chain(v8::Handle<v8::Value> v8Value, v8::Isolate* isolate) | 123 v8::Handle<v8::Object> V8TestInterfaceNamedConstructor2::findInstanceInPrototype
Chain(v8::Handle<v8::Value> v8Value, v8::Isolate* isolate) |
| 124 { | 124 { |
| 125 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe
rTypeInfo, v8Value); | 125 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe
rTypeInfo, v8Value); |
| 126 } | 126 } |
| 127 | 127 |
| 128 TestInterfaceNamedConstructor2* V8TestInterfaceNamedConstructor2::toNativeWithTy
peCheck(v8::Isolate* isolate, v8::Handle<v8::Value> value) | 128 TestInterfaceNamedConstructor2* V8TestInterfaceNamedConstructor2::toNativeWithTy
peCheck(v8::Isolate* isolate, v8::Handle<v8::Value> value) |
| 129 { | 129 { |
| 130 return hasInstance(value, isolate) ? fromInternalPointer(blink::toInternalPo
inter(v8::Handle<v8::Object>::Cast(value))) : 0; | 130 return hasInstance(value, isolate) ? fromInternalPointer(blink::toInternalPo
inter(v8::Handle<v8::Object>::Cast(value))) : 0; |
| 131 } | 131 } |
| 132 | 132 |
| 133 v8::Handle<v8::Object> wrap(TestInterfaceNamedConstructor2* impl, v8::Handle<v8:
:Object> creationContext, v8::Isolate* isolate) | |
| 134 { | |
| 135 ASSERT(impl); | |
| 136 ASSERT(!DOMDataStore::containsWrapper<V8TestInterfaceNamedConstructor2>(impl
, isolate)); | |
| 137 return V8TestInterfaceNamedConstructor2::createWrapper(impl, creationContext
, isolate); | |
| 138 } | |
| 139 | |
| 140 v8::Handle<v8::Object> V8TestInterfaceNamedConstructor2::createWrapper(PassRefPt
r<TestInterfaceNamedConstructor2> impl, v8::Handle<v8::Object> creationContext,
v8::Isolate* isolate) | |
| 141 { | |
| 142 ASSERT(impl); | |
| 143 ASSERT(!DOMDataStore::containsWrapper<V8TestInterfaceNamedConstructor2>(impl
.get(), isolate)); | |
| 144 const WrapperTypeInfo* actualInfo = impl->typeInfo(); | |
| 145 // Might be a XXXConstructor::wrapperTypeInfo instead of an XXX::wrapperType
Info. These will both have | |
| 146 // the same object de-ref functions, though, so use that as the basis of the
check. | |
| 147 RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(actualInfo->derefObjectFunction ==
wrapperTypeInfo.derefObjectFunction); | |
| 148 | |
| 149 v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext
, &wrapperTypeInfo, toInternalPointer(impl.get()), isolate); | |
| 150 if (UNLIKELY(wrapper.IsEmpty())) | |
| 151 return wrapper; | |
| 152 | |
| 153 installConditionallyEnabledProperties(wrapper, isolate); | |
| 154 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceNamedConstructor2>(i
mpl, &wrapperTypeInfo, wrapper, isolate); | |
| 155 return wrapper; | |
| 156 } | |
| 157 | |
| 158 | 133 |
| 159 void V8TestInterfaceNamedConstructor2::refObject(ScriptWrappableBase* internalPo
inter) | 134 void V8TestInterfaceNamedConstructor2::refObject(ScriptWrappableBase* internalPo
inter) |
| 160 { | 135 { |
| 161 fromInternalPointer(internalPointer)->ref(); | 136 fromInternalPointer(internalPointer)->ref(); |
| 162 } | 137 } |
| 163 | 138 |
| 164 void V8TestInterfaceNamedConstructor2::derefObject(ScriptWrappableBase* internal
Pointer) | 139 void V8TestInterfaceNamedConstructor2::derefObject(ScriptWrappableBase* internal
Pointer) |
| 165 { | 140 { |
| 166 fromInternalPointer(internalPointer)->deref(); | 141 fromInternalPointer(internalPointer)->deref(); |
| 167 } | 142 } |
| 168 | 143 |
| 169 PersistentNode* V8TestInterfaceNamedConstructor2::createPersistentHandle(ScriptW
rappableBase* internalPointer) | 144 PersistentNode* V8TestInterfaceNamedConstructor2::createPersistentHandle(ScriptW
rappableBase* internalPointer) |
| 170 { | 145 { |
| 171 ASSERT_NOT_REACHED(); | 146 ASSERT_NOT_REACHED(); |
| 172 return 0; | 147 return 0; |
| 173 } | 148 } |
| 174 | 149 |
| 175 template<> | 150 template<> |
| 176 v8::Handle<v8::Value> toV8NoInline(TestInterfaceNamedConstructor2* impl, v8::Han
dle<v8::Object> creationContext, v8::Isolate* isolate) | 151 v8::Handle<v8::Value> toV8NoInline(TestInterfaceNamedConstructor2* impl, v8::Han
dle<v8::Object> creationContext, v8::Isolate* isolate) |
| 177 { | 152 { |
| 178 return toV8(impl, creationContext, isolate); | 153 return toV8(impl, creationContext, isolate); |
| 179 } | 154 } |
| 180 | 155 |
| 181 } // namespace blink | 156 } // namespace blink |
| OLD | NEW |