OLD | NEW |
1 /* | 1 /* |
2 This file is part of the Blink open source project. | 2 This file is part of the Blink open source project. |
3 This file has been auto-generated by CodeGeneratorV8.pm. DO NOT MODIFY! | 3 This file has been auto-generated by CodeGeneratorV8.pm. DO NOT MODIFY! |
4 | 4 |
5 This library is free software; you can redistribute it and/or | 5 This library is free software; you can redistribute it and/or |
6 modify it under the terms of the GNU Library General Public | 6 modify it under the terms of the GNU Library General Public |
7 License as published by the Free Software Foundation; either | 7 License as published by the Free Software Foundation; either |
8 version 2 of the License, or (at your option) any later version. | 8 version 2 of the License, or (at your option) any later version. |
9 | 9 |
10 This library is distributed in the hope that it will be useful, | 10 This library is distributed in the hope that it will be useful, |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 { | 118 { |
119 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 119 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
120 TestObjV8Internal::readOnlyStringAttrAttributeGetter(name, info); | 120 TestObjV8Internal::readOnlyStringAttrAttributeGetter(name, info); |
121 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 121 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
122 } | 122 } |
123 | 123 |
124 static void readOnlyTestObjectAttrAttributeGetter(v8::Local<v8::String> name, co
nst v8::PropertyCallbackInfo<v8::Value>& info) | 124 static void readOnlyTestObjectAttrAttributeGetter(v8::Local<v8::String> name, co
nst v8::PropertyCallbackInfo<v8::Value>& info) |
125 { | 125 { |
126 TestObj* imp = V8TestObject::toNative(info.Holder()); | 126 TestObj* imp = V8TestObject::toNative(info.Holder()); |
127 RefPtr<TestObj> result = imp->readOnlyTestObjectAttr(); | 127 RefPtr<TestObj> result = imp->readOnlyTestObjectAttr(); |
128 if (result.get() && DOMDataStore::setReturnValueFromWrapper<V8TestObject>(in
fo.GetReturnValue(), result.get())) | 128 if (result && DOMDataStore::setReturnValueFromWrapper<V8TestObject>(info.Get
ReturnValue(), result.get())) |
129 return; | 129 return; |
130 v8::Handle<v8::Value> wrapper = toV8(result.get(), info.Holder(), info.GetIs
olate()); | 130 v8::Handle<v8::Value> wrapper = toV8(result.get(), info.Holder(), info.GetIs
olate()); |
131 if (!wrapper.IsEmpty()) { | 131 if (!wrapper.IsEmpty()) { |
132 V8HiddenPropertyName::setNamedHiddenReference(info.Holder(), "readOnlyTe
stObjectAttr", wrapper); | 132 V8HiddenPropertyName::setNamedHiddenReference(info.Holder(), "readOnlyTe
stObjectAttr", wrapper); |
133 v8SetReturnValue(info, wrapper); | 133 v8SetReturnValue(info, wrapper); |
134 } | 134 } |
135 } | 135 } |
136 | 136 |
137 static void readOnlyTestObjectAttrAttributeGetterCallback(v8::Local<v8::String>
name, const v8::PropertyCallbackInfo<v8::Value>& info) | 137 static void readOnlyTestObjectAttrAttributeGetterCallback(v8::Local<v8::String>
name, const v8::PropertyCallbackInfo<v8::Value>& info) |
138 { | 138 { |
(...skipping 1966 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2105 { | 2105 { |
2106 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 2106 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
2107 TestObjV8Internal::nullableStringValueAttributeSetter(name, value, info); | 2107 TestObjV8Internal::nullableStringValueAttributeSetter(name, value, info); |
2108 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 2108 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
2109 } | 2109 } |
2110 | 2110 |
2111 static void perWorldReadOnlyAttributeAttributeGetter(v8::Local<v8::String> name,
const v8::PropertyCallbackInfo<v8::Value>& info) | 2111 static void perWorldReadOnlyAttributeAttributeGetter(v8::Local<v8::String> name,
const v8::PropertyCallbackInfo<v8::Value>& info) |
2112 { | 2112 { |
2113 TestObj* imp = V8TestObject::toNative(info.Holder()); | 2113 TestObj* imp = V8TestObject::toNative(info.Holder()); |
2114 RefPtr<TestObj> result = imp->perWorldReadOnlyAttribute(); | 2114 RefPtr<TestObj> result = imp->perWorldReadOnlyAttribute(); |
2115 if (result.get() && DOMDataStore::setReturnValueFromWrapper<V8TestObject>(in
fo.GetReturnValue(), result.get())) | 2115 if (result && DOMDataStore::setReturnValueFromWrapper<V8TestObject>(info.Get
ReturnValue(), result.get())) |
2116 return; | 2116 return; |
2117 v8::Handle<v8::Value> wrapper = toV8(result.get(), info.Holder(), info.GetIs
olate()); | 2117 v8::Handle<v8::Value> wrapper = toV8(result.get(), info.Holder(), info.GetIs
olate()); |
2118 if (!wrapper.IsEmpty()) { | 2118 if (!wrapper.IsEmpty()) { |
2119 V8HiddenPropertyName::setNamedHiddenReference(info.Holder(), "perWorldRe
adOnlyAttribute", wrapper); | 2119 V8HiddenPropertyName::setNamedHiddenReference(info.Holder(), "perWorldRe
adOnlyAttribute", wrapper); |
2120 v8SetReturnValue(info, wrapper); | 2120 v8SetReturnValue(info, wrapper); |
2121 } | 2121 } |
2122 } | 2122 } |
2123 | 2123 |
2124 static void perWorldReadOnlyAttributeAttributeGetterCallback(v8::Local<v8::Strin
g> name, const v8::PropertyCallbackInfo<v8::Value>& info) | 2124 static void perWorldReadOnlyAttributeAttributeGetterCallback(v8::Local<v8::Strin
g> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
2125 { | 2125 { |
2126 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2126 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2127 TestObjV8Internal::perWorldReadOnlyAttributeAttributeGetter(name, info); | 2127 TestObjV8Internal::perWorldReadOnlyAttributeAttributeGetter(name, info); |
2128 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 2128 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
2129 } | 2129 } |
2130 | 2130 |
2131 static void perWorldReadOnlyAttributeAttributeGetterForMainWorld(v8::Local<v8::S
tring> name, const v8::PropertyCallbackInfo<v8::Value>& info) | 2131 static void perWorldReadOnlyAttributeAttributeGetterForMainWorld(v8::Local<v8::S
tring> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
2132 { | 2132 { |
2133 TestObj* imp = V8TestObject::toNative(info.Holder()); | 2133 TestObj* imp = V8TestObject::toNative(info.Holder()); |
2134 RefPtr<TestObj> result = imp->perWorldReadOnlyAttribute(); | 2134 RefPtr<TestObj> result = imp->perWorldReadOnlyAttribute(); |
2135 if (result.get() && DOMDataStore::setReturnValueFromWrapperForMainWorld<V8Te
stObject>(info.GetReturnValue(), result.get())) | 2135 if (result && DOMDataStore::setReturnValueFromWrapperForMainWorld<V8TestObje
ct>(info.GetReturnValue(), result.get())) |
2136 return; | 2136 return; |
2137 v8::Handle<v8::Value> wrapper = toV8(result.get(), info.Holder(), info.GetIs
olate()); | 2137 v8::Handle<v8::Value> wrapper = toV8(result.get(), info.Holder(), info.GetIs
olate()); |
2138 if (!wrapper.IsEmpty()) { | 2138 if (!wrapper.IsEmpty()) { |
2139 V8HiddenPropertyName::setNamedHiddenReference(info.Holder(), "perWorldRe
adOnlyAttribute", wrapper); | 2139 V8HiddenPropertyName::setNamedHiddenReference(info.Holder(), "perWorldRe
adOnlyAttribute", wrapper); |
2140 v8SetReturnValue(info, wrapper); | 2140 v8SetReturnValue(info, wrapper); |
2141 } | 2141 } |
2142 } | 2142 } |
2143 | 2143 |
2144 static void perWorldReadOnlyAttributeAttributeGetterCallbackForMainWorld(v8::Loc
al<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) | 2144 static void perWorldReadOnlyAttributeAttributeGetterCallbackForMainWorld(v8::Loc
al<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
2145 { | 2145 { |
(...skipping 3216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5362 proto->Set(v8::String::NewSymbol("enabledPerContextMethod"), v8::Functio
nTemplate::New(TestObjV8Internal::enabledPerContextMethodMethodCallback, v8Undef
ined(), defaultSignature, 1)->GetFunction()); | 5362 proto->Set(v8::String::NewSymbol("enabledPerContextMethod"), v8::Functio
nTemplate::New(TestObjV8Internal::enabledPerContextMethodMethodCallback, v8Undef
ined(), defaultSignature, 1)->GetFunction()); |
5363 } | 5363 } |
5364 | 5364 |
5365 EventTarget* V8TestObject::toEventTarget(v8::Handle<v8::Object> object) | 5365 EventTarget* V8TestObject::toEventTarget(v8::Handle<v8::Object> object) |
5366 { | 5366 { |
5367 return toNative(object); | 5367 return toNative(object); |
5368 } | 5368 } |
5369 | 5369 |
5370 v8::Handle<v8::Object> V8TestObject::createWrapper(PassRefPtr<TestObj> impl, v8:
:Handle<v8::Object> creationContext, v8::Isolate* isolate) | 5370 v8::Handle<v8::Object> V8TestObject::createWrapper(PassRefPtr<TestObj> impl, v8:
:Handle<v8::Object> creationContext, v8::Isolate* isolate) |
5371 { | 5371 { |
5372 ASSERT(impl.get()); | 5372 ASSERT(impl); |
5373 ASSERT(!DOMDataStore::containsWrapper<V8TestObject>(impl.get(), isolate)); | 5373 ASSERT(!DOMDataStore::containsWrapper<V8TestObject>(impl.get(), isolate)); |
5374 if (ScriptWrappable::wrapperCanBeStoredInObject(impl.get())) { | 5374 if (ScriptWrappable::wrapperCanBeStoredInObject(impl.get())) { |
5375 const WrapperTypeInfo* actualInfo = ScriptWrappable::getTypeInfoFromObje
ct(impl.get()); | 5375 const WrapperTypeInfo* actualInfo = ScriptWrappable::getTypeInfoFromObje
ct(impl.get()); |
5376 // Might be a XXXConstructor::info instead of an XXX::info. These will b
oth have | 5376 // Might be a XXXConstructor::info instead of an XXX::info. These will b
oth have |
5377 // the same object de-ref functions, though, so use that as the basis of
the check. | 5377 // the same object de-ref functions, though, so use that as the basis of
the check. |
5378 RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(actualInfo->derefObjectFunction
== info.derefObjectFunction); | 5378 RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(actualInfo->derefObjectFunction
== info.derefObjectFunction); |
5379 } | 5379 } |
5380 | 5380 |
5381 v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext
, &info, toInternalPointer(impl.get()), isolate); | 5381 v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext
, &info, toInternalPointer(impl.get()), isolate); |
5382 if (UNLIKELY(wrapper.IsEmpty())) | 5382 if (UNLIKELY(wrapper.IsEmpty())) |
5383 return wrapper; | 5383 return wrapper; |
5384 | 5384 |
5385 installPerContextProperties(wrapper, impl.get(), isolate); | 5385 installPerContextProperties(wrapper, impl.get(), isolate); |
5386 V8DOMWrapper::associateObjectWithWrapper<V8TestObject>(impl, &info, wrapper,
isolate, WrapperConfiguration::Independent); | 5386 V8DOMWrapper::associateObjectWithWrapper<V8TestObject>(impl, &info, wrapper,
isolate, WrapperConfiguration::Independent); |
5387 return wrapper; | 5387 return wrapper; |
5388 } | 5388 } |
5389 | 5389 |
5390 void V8TestObject::derefObject(void* object) | 5390 void V8TestObject::derefObject(void* object) |
5391 { | 5391 { |
5392 fromInternalPointer(object)->deref(); | 5392 fromInternalPointer(object)->deref(); |
5393 } | 5393 } |
5394 | 5394 |
5395 } // namespace WebCore | 5395 } // namespace WebCore |
OLD | NEW |