| 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 "V8TestInterface3.h" | 8 #include "V8TestInterface3.h" |
| 9 | 9 |
| 10 #include "bindings/core/v8/ExceptionState.h" | 10 #include "bindings/core/v8/ExceptionState.h" |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, v8Valu
e); | 130 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, v8Valu
e); |
| 131 } | 131 } |
| 132 | 132 |
| 133 v8::Handle<v8::Object> V8TestInterface3::findInstanceInPrototypeChain(v8::Handle
<v8::Value> v8Value, v8::Isolate* isolate) | 133 v8::Handle<v8::Object> V8TestInterface3::findInstanceInPrototypeChain(v8::Handle
<v8::Value> v8Value, v8::Isolate* isolate) |
| 134 { | 134 { |
| 135 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe
rTypeInfo, v8Value); | 135 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe
rTypeInfo, v8Value); |
| 136 } | 136 } |
| 137 | 137 |
| 138 TestInterface3* V8TestInterface3::toNativeWithTypeCheck(v8::Isolate* isolate, v8
::Handle<v8::Value> value) | 138 TestInterface3* V8TestInterface3::toNativeWithTypeCheck(v8::Isolate* isolate, v8
::Handle<v8::Value> value) |
| 139 { | 139 { |
| 140 return hasInstance(value, isolate) ? fromInternalPointer(v8::Handle<v8::Obje
ct>::Cast(value)->GetAlignedPointerFromInternalField(v8DOMWrapperObjectIndex)) :
0; | 140 return hasInstance(value, isolate) ? fromInternalPointer(blink::toInternalPo
inter(v8::Handle<v8::Object>::Cast(value))) : 0; |
| 141 } | 141 } |
| 142 | 142 |
| 143 v8::Handle<v8::Object> wrap(TestInterface3* impl, v8::Handle<v8::Object> creatio
nContext, v8::Isolate* isolate) | 143 v8::Handle<v8::Object> wrap(TestInterface3* impl, v8::Handle<v8::Object> creatio
nContext, v8::Isolate* isolate) |
| 144 { | 144 { |
| 145 ASSERT(impl); | 145 ASSERT(impl); |
| 146 ASSERT(!DOMDataStore::containsWrapper<V8TestInterface3>(impl, isolate)); | 146 ASSERT(!DOMDataStore::containsWrapper<V8TestInterface3>(impl, isolate)); |
| 147 return V8TestInterface3::createWrapper(impl, creationContext, isolate); | 147 return V8TestInterface3::createWrapper(impl, creationContext, isolate); |
| 148 } | 148 } |
| 149 | 149 |
| 150 v8::Handle<v8::Object> V8TestInterface3::createWrapper(PassRefPtr<TestInterface3
> impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate) | 150 v8::Handle<v8::Object> V8TestInterface3::createWrapper(PassRefPtr<TestInterface3
> impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate) |
| 151 { | 151 { |
| 152 ASSERT(impl); | 152 ASSERT(impl); |
| 153 ASSERT(!DOMDataStore::containsWrapper<V8TestInterface3>(impl.get(), isolate)
); | 153 ASSERT(!DOMDataStore::containsWrapper<V8TestInterface3>(impl.get(), isolate)
); |
| 154 if (ScriptWrappable::wrapperCanBeStoredInObject(impl.get())) { | 154 if (ScriptWrappable::wrapperCanBeStoredInObject(impl.get())) { |
| 155 const WrapperTypeInfo* actualInfo = ScriptWrappable::fromObject(impl.get
())->typeInfo(); | 155 const WrapperTypeInfo* actualInfo = ScriptWrappable::fromObject(impl.get
())->typeInfo(); |
| 156 // Might be a XXXConstructor::wrapperTypeInfo instead of an XXX::wrapper
TypeInfo. These will both have | 156 // Might be a XXXConstructor::wrapperTypeInfo instead of an XXX::wrapper
TypeInfo. These will both have |
| 157 // the same object de-ref functions, though, so use that as the basis of
the check. | 157 // the same object de-ref functions, though, so use that as the basis of
the check. |
| 158 RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(actualInfo->derefObjectFunction
== wrapperTypeInfo.derefObjectFunction); | 158 RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(actualInfo->derefObjectFunction
== wrapperTypeInfo.derefObjectFunction); |
| 159 } | 159 } |
| 160 | 160 |
| 161 v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext
, &wrapperTypeInfo, toInternalPointer(impl.get()), isolate); | 161 v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext
, &wrapperTypeInfo, toInternalPointer(impl.get()), isolate); |
| 162 if (UNLIKELY(wrapper.IsEmpty())) | 162 if (UNLIKELY(wrapper.IsEmpty())) |
| 163 return wrapper; | 163 return wrapper; |
| 164 | 164 |
| 165 installPerContextEnabledProperties(wrapper, impl.get(), isolate); | 165 installPerContextEnabledProperties(wrapper, impl.get(), isolate); |
| 166 V8DOMWrapper::associateObjectWithWrapper<V8TestInterface3>(impl, &wrapperTyp
eInfo, wrapper, isolate, WrapperConfiguration::Dependent); | 166 V8DOMWrapper::associateObjectWithWrapper<V8TestInterface3>(impl, &wrapperTyp
eInfo, wrapper, isolate, WrapperConfiguration::Dependent); |
| 167 return wrapper; | 167 return wrapper; |
| 168 } | 168 } |
| 169 | 169 |
| 170 void V8TestInterface3::derefObject(void* object) | 170 void V8TestInterface3::derefObject(ScriptWrappableBase* internalPointer) |
| 171 { | 171 { |
| 172 fromInternalPointer(object)->deref(); | 172 fromInternalPointer(internalPointer)->deref(); |
| 173 } | 173 } |
| 174 | 174 |
| 175 template<> | 175 template<> |
| 176 v8::Handle<v8::Value> toV8NoInline(TestInterface3* impl, v8::Handle<v8::Object>
creationContext, v8::Isolate* isolate) | 176 v8::Handle<v8::Value> toV8NoInline(TestInterface3* impl, v8::Handle<v8::Object>
creationContext, v8::Isolate* isolate) |
| 177 { | 177 { |
| 178 return toV8(impl, creationContext, isolate); | 178 return toV8(impl, creationContext, isolate); |
| 179 } | 179 } |
| 180 | 180 |
| 181 } // namespace blink | 181 } // namespace blink |
| OLD | NEW |