| 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 "V8TestInterfaceEventConstructor.h" | 8 #include "V8TestInterfaceEventConstructor.h" |
| 9 | 9 |
| 10 #include "RuntimeEnabledFeatures.h" | 10 #include "RuntimeEnabledFeatures.h" |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 } | 36 } |
| 37 | 37 |
| 38 } // namespace WebCore | 38 } // namespace WebCore |
| 39 | 39 |
| 40 void webCoreInitializeScriptWrappableForInterface(WebCore::TestInterfaceEventCon
structor* object) | 40 void webCoreInitializeScriptWrappableForInterface(WebCore::TestInterfaceEventCon
structor* object) |
| 41 { | 41 { |
| 42 WebCore::initializeScriptWrappableForInterface(object); | 42 WebCore::initializeScriptWrappableForInterface(object); |
| 43 } | 43 } |
| 44 | 44 |
| 45 namespace WebCore { | 45 namespace WebCore { |
| 46 const WrapperTypeInfo V8TestInterfaceEventConstructor::wrapperTypeInfo = { gin::
kEmbedderBlink, V8TestInterfaceEventConstructor::domTemplate, V8TestInterfaceEve
ntConstructor::derefObject, 0, 0, 0, V8TestInterfaceEventConstructor::installPer
ContextEnabledMethods, &V8Event::wrapperTypeInfo, WrapperTypeObjectPrototype, fa
lse }; | 46 const WrapperTypeInfo V8TestInterfaceEventConstructor::wrapperTypeInfo = { gin::
kEmbedderBlink, V8TestInterfaceEventConstructor::domTemplate, V8TestInterfaceEve
ntConstructor::derefObject, 0, 0, 0, V8TestInterfaceEventConstructor::installPer
ContextEnabledMethods, &V8Event::wrapperTypeInfo, WrapperTypeObjectPrototype, tr
ue }; |
| 47 | 47 |
| 48 namespace TestInterfaceEventConstructorV8Internal { | 48 namespace TestInterfaceEventConstructorV8Internal { |
| 49 | 49 |
| 50 template <typename T> void V8_USE(T) { } | 50 template <typename T> void V8_USE(T) { } |
| 51 | 51 |
| 52 static void readonlyStringAttributeAttributeGetter(const v8::PropertyCallbackInf
o<v8::Value>& info) | 52 static void readonlyStringAttributeAttributeGetter(const v8::PropertyCallbackInf
o<v8::Value>& info) |
| 53 { | 53 { |
| 54 TestInterfaceEventConstructor* impl = V8TestInterfaceEventConstructor::toNat
ive(info.Holder()); | 54 TestInterfaceEventConstructor* impl = V8TestInterfaceEventConstructor::toNat
ive(info.Holder()); |
| 55 v8SetReturnValueString(info, impl->readonlyStringAttribute(), info.GetIsolat
e()); | 55 v8SetReturnValueString(info, impl->readonlyStringAttribute(), info.GetIsolat
e()); |
| 56 } | 56 } |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 250 if (info.Length() >= 2) { | 250 if (info.Length() >= 2) { |
| 251 V8TRYCATCH_VOID(Dictionary, options, Dictionary(info[1], isolate)); | 251 V8TRYCATCH_VOID(Dictionary, options, Dictionary(info[1], isolate)); |
| 252 if (!initializeTestInterfaceEventConstructor(eventInit, options, excepti
onState, info)) { | 252 if (!initializeTestInterfaceEventConstructor(eventInit, options, excepti
onState, info)) { |
| 253 exceptionState.throwIfNeeded(); | 253 exceptionState.throwIfNeeded(); |
| 254 return; | 254 return; |
| 255 } | 255 } |
| 256 options.get("initializedByEventConstructorReadonlyAnyAttribute", initial
izedByEventConstructorReadonlyAnyAttribute); | 256 options.get("initializedByEventConstructorReadonlyAnyAttribute", initial
izedByEventConstructorReadonlyAnyAttribute); |
| 257 if (!initializedByEventConstructorReadonlyAnyAttribute.IsEmpty()) | 257 if (!initializedByEventConstructorReadonlyAnyAttribute.IsEmpty()) |
| 258 V8HiddenValue::setHiddenValue(isolate, info.Holder(), v8AtomicString
(isolate, "initializedByEventConstructorReadonlyAnyAttribute"), initializedByEve
ntConstructorReadonlyAnyAttribute); | 258 V8HiddenValue::setHiddenValue(isolate, info.Holder(), v8AtomicString
(isolate, "initializedByEventConstructorReadonlyAnyAttribute"), initializedByEve
ntConstructorReadonlyAnyAttribute); |
| 259 } | 259 } |
| 260 RefPtr<TestInterfaceEventConstructor> event = TestInterfaceEventConstructor:
:create(type, eventInit, exceptionState); | 260 RefPtrWillBeRawPtr<TestInterfaceEventConstructor> event = TestInterfaceEvent
Constructor::create(type, eventInit, exceptionState); |
| 261 if (exceptionState.throwIfNeeded()) | 261 if (exceptionState.throwIfNeeded()) |
| 262 return; | 262 return; |
| 263 if (DOMWrapperWorld::current(isolate)->isIsolatedWorld()) { | 263 if (DOMWrapperWorld::current(isolate)->isIsolatedWorld()) { |
| 264 if (!initializedByEventConstructorReadonlyAnyAttribute.IsEmpty()) | 264 if (!initializedByEventConstructorReadonlyAnyAttribute.IsEmpty()) |
| 265 event->setSerializedInitializedByEventConstructorReadonlyAnyAttribut
e(SerializedScriptValue::createAndSwallowExceptions(initializedByEventConstructo
rReadonlyAnyAttribute, isolate)); | 265 event->setSerializedInitializedByEventConstructorReadonlyAnyAttribut
e(SerializedScriptValue::createAndSwallowExceptions(initializedByEventConstructo
rReadonlyAnyAttribute, isolate)); |
| 266 } | 266 } |
| 267 | 267 |
| 268 v8::Handle<v8::Object> wrapper = info.Holder(); | 268 v8::Handle<v8::Object> wrapper = info.Holder(); |
| 269 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceEventConstructor>(ev
ent.release(), &V8TestInterfaceEventConstructor::wrapperTypeInfo, wrapper, isola
te, WrapperConfiguration::Independent); | 269 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceEventConstructor>(ev
ent.release(), &V8TestInterfaceEventConstructor::wrapperTypeInfo, wrapper, isola
te, WrapperConfiguration::Independent); |
| 270 v8SetReturnValue(info, wrapper); | 270 v8SetReturnValue(info, wrapper); |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 381 v8::Handle<v8::Object> V8TestInterfaceEventConstructor::findInstanceInPrototypeC
hain(v8::Handle<v8::Value> jsValue, v8::Isolate* isolate) | 381 v8::Handle<v8::Object> V8TestInterfaceEventConstructor::findInstanceInPrototypeC
hain(v8::Handle<v8::Value> jsValue, v8::Isolate* isolate) |
| 382 { | 382 { |
| 383 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe
rTypeInfo, jsValue); | 383 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe
rTypeInfo, jsValue); |
| 384 } | 384 } |
| 385 | 385 |
| 386 TestInterfaceEventConstructor* V8TestInterfaceEventConstructor::toNativeWithType
Check(v8::Isolate* isolate, v8::Handle<v8::Value> value) | 386 TestInterfaceEventConstructor* V8TestInterfaceEventConstructor::toNativeWithType
Check(v8::Isolate* isolate, v8::Handle<v8::Value> value) |
| 387 { | 387 { |
| 388 return hasInstance(value, isolate) ? fromInternalPointer(v8::Handle<v8::Obje
ct>::Cast(value)->GetAlignedPointerFromInternalField(v8DOMWrapperObjectIndex)) :
0; | 388 return hasInstance(value, isolate) ? fromInternalPointer(v8::Handle<v8::Obje
ct>::Cast(value)->GetAlignedPointerFromInternalField(v8DOMWrapperObjectIndex)) :
0; |
| 389 } | 389 } |
| 390 | 390 |
| 391 v8::Handle<v8::Object> V8TestInterfaceEventConstructor::createWrapper(PassRefPtr
<TestInterfaceEventConstructor> impl, v8::Handle<v8::Object> creationContext, v8
::Isolate* isolate) | 391 v8::Handle<v8::Object> V8TestInterfaceEventConstructor::createWrapper(PassRefPtr
WillBeRawPtr<TestInterfaceEventConstructor> impl, v8::Handle<v8::Object> creatio
nContext, v8::Isolate* isolate) |
| 392 { | 392 { |
| 393 ASSERT(impl); | 393 ASSERT(impl); |
| 394 ASSERT(!DOMDataStore::containsWrapper<V8TestInterfaceEventConstructor>(impl.
get(), isolate)); | 394 ASSERT(!DOMDataStore::containsWrapper<V8TestInterfaceEventConstructor>(impl.
get(), isolate)); |
| 395 if (ScriptWrappable::wrapperCanBeStoredInObject(impl.get())) { | 395 if (ScriptWrappable::wrapperCanBeStoredInObject(impl.get())) { |
| 396 const WrapperTypeInfo* actualInfo = ScriptWrappable::getTypeInfoFromObje
ct(impl.get()); | 396 const WrapperTypeInfo* actualInfo = ScriptWrappable::getTypeInfoFromObje
ct(impl.get()); |
| 397 // Might be a XXXConstructor::wrapperTypeInfo instead of an XXX::wrapper
TypeInfo. These will both have | 397 // Might be a XXXConstructor::wrapperTypeInfo instead of an XXX::wrapper
TypeInfo. These will both have |
| 398 // the same object de-ref functions, though, so use that as the basis of
the check. | 398 // the same object de-ref functions, though, so use that as the basis of
the check. |
| 399 RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(actualInfo->derefObjectFunction
== wrapperTypeInfo.derefObjectFunction); | 399 RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(actualInfo->derefObjectFunction
== wrapperTypeInfo.derefObjectFunction); |
| 400 } | 400 } |
| 401 | 401 |
| 402 v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext
, &wrapperTypeInfo, toInternalPointer(impl.get()), isolate); | 402 v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext
, &wrapperTypeInfo, toInternalPointer(impl.get()), isolate); |
| 403 if (UNLIKELY(wrapper.IsEmpty())) | 403 if (UNLIKELY(wrapper.IsEmpty())) |
| 404 return wrapper; | 404 return wrapper; |
| 405 | 405 |
| 406 installPerContextEnabledProperties(wrapper, impl.get(), isolate); | 406 installPerContextEnabledProperties(wrapper, impl.get(), isolate); |
| 407 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceEventConstructor>(im
pl, &wrapperTypeInfo, wrapper, isolate, WrapperConfiguration::Independent); | 407 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceEventConstructor>(im
pl, &wrapperTypeInfo, wrapper, isolate, WrapperConfiguration::Independent); |
| 408 return wrapper; | 408 return wrapper; |
| 409 } | 409 } |
| 410 | 410 |
| 411 void V8TestInterfaceEventConstructor::derefObject(void* object) | 411 void V8TestInterfaceEventConstructor::derefObject(void* object) |
| 412 { | 412 { |
| 413 #if !ENABLE(OILPAN) |
| 413 fromInternalPointer(object)->deref(); | 414 fromInternalPointer(object)->deref(); |
| 415 #endif // !ENABLE(OILPAN) |
| 414 } | 416 } |
| 415 | 417 |
| 416 template<> | 418 template<> |
| 417 v8::Handle<v8::Value> toV8NoInline(TestInterfaceEventConstructor* impl, v8::Hand
le<v8::Object> creationContext, v8::Isolate* isolate) | 419 v8::Handle<v8::Value> toV8NoInline(TestInterfaceEventConstructor* impl, v8::Hand
le<v8::Object> creationContext, v8::Isolate* isolate) |
| 418 { | 420 { |
| 419 return toV8(impl, creationContext, isolate); | 421 return toV8(impl, creationContext, isolate); |
| 420 } | 422 } |
| 421 | 423 |
| 422 } // namespace WebCore | 424 } // namespace WebCore |
| OLD | NEW |