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 "V8TestInterfaceConstructor2.h" | 8 #include "V8TestInterfaceConstructor2.h" |
9 | 9 |
10 #include "bindings/core/v8/Dictionary.h" | 10 #include "bindings/core/v8/Dictionary.h" |
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, v8Valu
e); | 216 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, v8Valu
e); |
217 } | 217 } |
218 | 218 |
219 v8::Handle<v8::Object> V8TestInterfaceConstructor2::findInstanceInPrototypeChain
(v8::Handle<v8::Value> v8Value, v8::Isolate* isolate) | 219 v8::Handle<v8::Object> V8TestInterfaceConstructor2::findInstanceInPrototypeChain
(v8::Handle<v8::Value> v8Value, v8::Isolate* isolate) |
220 { | 220 { |
221 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe
rTypeInfo, v8Value); | 221 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe
rTypeInfo, v8Value); |
222 } | 222 } |
223 | 223 |
224 TestInterfaceConstructor2* V8TestInterfaceConstructor2::toNativeWithTypeCheck(v8
::Isolate* isolate, v8::Handle<v8::Value> value) | 224 TestInterfaceConstructor2* V8TestInterfaceConstructor2::toNativeWithTypeCheck(v8
::Isolate* isolate, v8::Handle<v8::Value> value) |
225 { | 225 { |
226 return hasInstance(value, isolate) ? fromInternalPointer(v8::Handle<v8::Obje
ct>::Cast(value)->GetAlignedPointerFromInternalField(v8DOMWrapperObjectIndex)) :
0; | 226 return hasInstance(value, isolate) ? fromInternalPointer(blink::toInternalPo
inter(v8::Handle<v8::Object>::Cast(value))) : 0; |
227 } | 227 } |
228 | 228 |
229 v8::Handle<v8::Object> wrap(TestInterfaceConstructor2* impl, v8::Handle<v8::Obje
ct> creationContext, v8::Isolate* isolate) | 229 v8::Handle<v8::Object> wrap(TestInterfaceConstructor2* impl, v8::Handle<v8::Obje
ct> creationContext, v8::Isolate* isolate) |
230 { | 230 { |
231 ASSERT(impl); | 231 ASSERT(impl); |
232 ASSERT(!DOMDataStore::containsWrapper<V8TestInterfaceConstructor2>(impl, iso
late)); | 232 ASSERT(!DOMDataStore::containsWrapper<V8TestInterfaceConstructor2>(impl, iso
late)); |
233 return V8TestInterfaceConstructor2::createWrapper(impl, creationContext, iso
late); | 233 return V8TestInterfaceConstructor2::createWrapper(impl, creationContext, iso
late); |
234 } | 234 } |
235 | 235 |
236 v8::Handle<v8::Object> V8TestInterfaceConstructor2::createWrapper(PassRefPtr<Tes
tInterfaceConstructor2> impl, v8::Handle<v8::Object> creationContext, v8::Isolat
e* isolate) | 236 v8::Handle<v8::Object> V8TestInterfaceConstructor2::createWrapper(PassRefPtr<Tes
tInterfaceConstructor2> impl, v8::Handle<v8::Object> creationContext, v8::Isolat
e* isolate) |
237 { | 237 { |
238 ASSERT(impl); | 238 ASSERT(impl); |
239 ASSERT(!DOMDataStore::containsWrapper<V8TestInterfaceConstructor2>(impl.get(
), isolate)); | 239 ASSERT(!DOMDataStore::containsWrapper<V8TestInterfaceConstructor2>(impl.get(
), isolate)); |
240 if (ScriptWrappable::wrapperCanBeStoredInObject(impl.get())) { | 240 if (ScriptWrappable::wrapperCanBeStoredInObject(impl.get())) { |
241 const WrapperTypeInfo* actualInfo = ScriptWrappable::fromObject(impl.get
())->typeInfo(); | 241 const WrapperTypeInfo* actualInfo = ScriptWrappable::fromObject(impl.get
())->typeInfo(); |
242 // Might be a XXXConstructor::wrapperTypeInfo instead of an XXX::wrapper
TypeInfo. These will both have | 242 // Might be a XXXConstructor::wrapperTypeInfo instead of an XXX::wrapper
TypeInfo. These will both have |
243 // the same object de-ref functions, though, so use that as the basis of
the check. | 243 // the same object de-ref functions, though, so use that as the basis of
the check. |
244 RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(actualInfo->derefObjectFunction
== wrapperTypeInfo.derefObjectFunction); | 244 RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(actualInfo->derefObjectFunction
== wrapperTypeInfo.derefObjectFunction); |
245 } | 245 } |
246 | 246 |
247 v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext
, &wrapperTypeInfo, toInternalPointer(impl.get()), isolate); | 247 v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext
, &wrapperTypeInfo, toInternalPointer(impl.get()), isolate); |
248 if (UNLIKELY(wrapper.IsEmpty())) | 248 if (UNLIKELY(wrapper.IsEmpty())) |
249 return wrapper; | 249 return wrapper; |
250 | 250 |
251 installPerContextEnabledProperties(wrapper, impl.get(), isolate); | 251 installPerContextEnabledProperties(wrapper, impl.get(), isolate); |
252 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceConstructor2>(impl,
&wrapperTypeInfo, wrapper, isolate, WrapperConfiguration::Independent); | 252 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceConstructor2>(impl,
&wrapperTypeInfo, wrapper, isolate, WrapperConfiguration::Independent); |
253 return wrapper; | 253 return wrapper; |
254 } | 254 } |
255 | 255 |
256 void V8TestInterfaceConstructor2::derefObject(void* object) | 256 void V8TestInterfaceConstructor2::derefObject(ScriptWrappableBase* internalPoint
er) |
257 { | 257 { |
258 fromInternalPointer(object)->deref(); | 258 fromInternalPointer(internalPointer)->deref(); |
259 } | 259 } |
260 | 260 |
261 template<> | 261 template<> |
262 v8::Handle<v8::Value> toV8NoInline(TestInterfaceConstructor2* impl, v8::Handle<v
8::Object> creationContext, v8::Isolate* isolate) | 262 v8::Handle<v8::Value> toV8NoInline(TestInterfaceConstructor2* impl, v8::Handle<v
8::Object> creationContext, v8::Isolate* isolate) |
263 { | 263 { |
264 return toV8(impl, creationContext, isolate); | 264 return toV8(impl, creationContext, isolate); |
265 } | 265 } |
266 | 266 |
267 } // namespace blink | 267 } // namespace blink |
OLD | NEW |