| 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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, v8Valu
e); | 117 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, v8Valu
e); |
| 118 } | 118 } |
| 119 | 119 |
| 120 v8::Handle<v8::Object> V8TestInterfaceNamedConstructor2::findInstanceInPrototype
Chain(v8::Handle<v8::Value> v8Value, v8::Isolate* isolate) | 120 v8::Handle<v8::Object> V8TestInterfaceNamedConstructor2::findInstanceInPrototype
Chain(v8::Handle<v8::Value> v8Value, v8::Isolate* isolate) |
| 121 { | 121 { |
| 122 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe
rTypeInfo, v8Value); | 122 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe
rTypeInfo, v8Value); |
| 123 } | 123 } |
| 124 | 124 |
| 125 TestInterfaceNamedConstructor2* V8TestInterfaceNamedConstructor2::toNativeWithTy
peCheck(v8::Isolate* isolate, v8::Handle<v8::Value> value) | 125 TestInterfaceNamedConstructor2* V8TestInterfaceNamedConstructor2::toNativeWithTy
peCheck(v8::Isolate* isolate, v8::Handle<v8::Value> value) |
| 126 { | 126 { |
| 127 return hasInstance(value, isolate) ? fromInternalPointer(v8::Handle<v8::Obje
ct>::Cast(value)->GetAlignedPointerFromInternalField(v8DOMWrapperObjectIndex)) :
0; | 127 return hasInstance(value, isolate) ? fromInternalPointer(blink::toInternalPo
inter(v8::Handle<v8::Object>::Cast(value))) : 0; |
| 128 } | 128 } |
| 129 | 129 |
| 130 v8::Handle<v8::Object> wrap(TestInterfaceNamedConstructor2* impl, v8::Handle<v8:
:Object> creationContext, v8::Isolate* isolate) | 130 v8::Handle<v8::Object> wrap(TestInterfaceNamedConstructor2* impl, v8::Handle<v8:
:Object> creationContext, v8::Isolate* isolate) |
| 131 { | 131 { |
| 132 ASSERT(impl); | 132 ASSERT(impl); |
| 133 ASSERT(!DOMDataStore::containsWrapper<V8TestInterfaceNamedConstructor2>(impl
, isolate)); | 133 ASSERT(!DOMDataStore::containsWrapper<V8TestInterfaceNamedConstructor2>(impl
, isolate)); |
| 134 return V8TestInterfaceNamedConstructor2::createWrapper(impl, creationContext
, isolate); | 134 return V8TestInterfaceNamedConstructor2::createWrapper(impl, creationContext
, isolate); |
| 135 } | 135 } |
| 136 | 136 |
| 137 v8::Handle<v8::Object> V8TestInterfaceNamedConstructor2::createWrapper(PassRefPt
r<TestInterfaceNamedConstructor2> impl, v8::Handle<v8::Object> creationContext,
v8::Isolate* isolate) | 137 v8::Handle<v8::Object> V8TestInterfaceNamedConstructor2::createWrapper(PassRefPt
r<TestInterfaceNamedConstructor2> impl, v8::Handle<v8::Object> creationContext,
v8::Isolate* isolate) |
| 138 { | 138 { |
| 139 ASSERT(impl); | 139 ASSERT(impl); |
| 140 ASSERT(!DOMDataStore::containsWrapper<V8TestInterfaceNamedConstructor2>(impl
.get(), isolate)); | 140 ASSERT(!DOMDataStore::containsWrapper<V8TestInterfaceNamedConstructor2>(impl
.get(), isolate)); |
| 141 if (ScriptWrappable::wrapperCanBeStoredInObject(impl.get())) { | 141 if (ScriptWrappable::wrapperCanBeStoredInObject(impl.get())) { |
| 142 const WrapperTypeInfo* actualInfo = ScriptWrappable::fromObject(impl.get
())->typeInfo(); | 142 const WrapperTypeInfo* actualInfo = ScriptWrappable::fromObject(impl.get
())->typeInfo(); |
| 143 // Might be a XXXConstructor::wrapperTypeInfo instead of an XXX::wrapper
TypeInfo. These will both have | 143 // Might be a XXXConstructor::wrapperTypeInfo instead of an XXX::wrapper
TypeInfo. These will both have |
| 144 // the same object de-ref functions, though, so use that as the basis of
the check. | 144 // the same object de-ref functions, though, so use that as the basis of
the check. |
| 145 RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(actualInfo->derefObjectFunction
== wrapperTypeInfo.derefObjectFunction); | 145 RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(actualInfo->derefObjectFunction
== wrapperTypeInfo.derefObjectFunction); |
| 146 } | 146 } |
| 147 | 147 |
| 148 v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext
, &wrapperTypeInfo, toInternalPointer(impl.get()), isolate); | 148 v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext
, &wrapperTypeInfo, toInternalPointer(impl.get()), isolate); |
| 149 if (UNLIKELY(wrapper.IsEmpty())) | 149 if (UNLIKELY(wrapper.IsEmpty())) |
| 150 return wrapper; | 150 return wrapper; |
| 151 | 151 |
| 152 installPerContextEnabledProperties(wrapper, impl.get(), isolate); | 152 installPerContextEnabledProperties(wrapper, impl.get(), isolate); |
| 153 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceNamedConstructor2>(i
mpl, &wrapperTypeInfo, wrapper, isolate, WrapperConfiguration::Independent); | 153 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceNamedConstructor2>(i
mpl, &wrapperTypeInfo, wrapper, isolate, WrapperConfiguration::Independent); |
| 154 return wrapper; | 154 return wrapper; |
| 155 } | 155 } |
| 156 | 156 |
| 157 void V8TestInterfaceNamedConstructor2::derefObject(void* object) | 157 void V8TestInterfaceNamedConstructor2::derefObject(ScriptWrappableBase* internal
Pointer) |
| 158 { | 158 { |
| 159 fromInternalPointer(object)->deref(); | 159 fromInternalPointer(internalPointer)->deref(); |
| 160 } | 160 } |
| 161 | 161 |
| 162 template<> | 162 template<> |
| 163 v8::Handle<v8::Value> toV8NoInline(TestInterfaceNamedConstructor2* impl, v8::Han
dle<v8::Object> creationContext, v8::Isolate* isolate) | 163 v8::Handle<v8::Value> toV8NoInline(TestInterfaceNamedConstructor2* impl, v8::Han
dle<v8::Object> creationContext, v8::Isolate* isolate) |
| 164 { | 164 { |
| 165 return toV8(impl, creationContext, isolate); | 165 return toV8(impl, creationContext, isolate); |
| 166 } | 166 } |
| 167 | 167 |
| 168 } // namespace blink | 168 } // namespace blink |
| OLD | NEW |