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::readOnlyStringAttrAttrGetter(name, info); | 120 TestObjV8Internal::readOnlyStringAttrAttrGetter(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 readOnlyTestObjectAttrAttrGetter(v8::Local<v8::String> name, const v
8::PropertyCallbackInfo<v8::Value>& info) | 124 static void readOnlyTestObjectAttrAttrGetter(v8::Local<v8::String> name, const v
8::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 v8::Handle<v8::Value> wrapper = result.get() ? v8::Handle<v8::Value>(DOMData
Store::getWrapper(result.get(), info.GetIsolate())) : v8Undefined(); | 128 v8::Handle<v8::Value> wrapper = result.get() ? v8::Handle<v8::Value>(DOMData
Store::getWrapper<V8TestObject>(result.get(), info.GetIsolate())) : v8Undefined(
); |
129 if (wrapper.IsEmpty()) { | 129 if (wrapper.IsEmpty()) { |
130 wrapper = toV8(result.get(), info.Holder(), info.GetIsolate()); | 130 wrapper = toV8(result.get(), info.Holder(), info.GetIsolate()); |
131 if (!wrapper.IsEmpty()) | 131 if (!wrapper.IsEmpty()) |
132 V8HiddenPropertyName::setNamedHiddenReference(info.Holder(), "readOn
lyTestObjectAttr", wrapper); | 132 V8HiddenPropertyName::setNamedHiddenReference(info.Holder(), "readOn
lyTestObjectAttr", wrapper); |
133 } | 133 } |
134 v8SetReturnValue(info, wrapper); | 134 v8SetReturnValue(info, wrapper); |
135 return; | 135 return; |
136 } | 136 } |
137 | 137 |
138 static void readOnlyTestObjectAttrAttrGetterCallback(v8::Local<v8::String> name,
const v8::PropertyCallbackInfo<v8::Value>& info) | 138 static void readOnlyTestObjectAttrAttrGetterCallback(v8::Local<v8::String> name,
const v8::PropertyCallbackInfo<v8::Value>& info) |
(...skipping 2139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2278 { | 2278 { |
2279 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 2279 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
2280 TestObjV8Internal::nullableStringValueAttrSetter(name, value, info); | 2280 TestObjV8Internal::nullableStringValueAttrSetter(name, value, info); |
2281 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 2281 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
2282 } | 2282 } |
2283 | 2283 |
2284 static void perWorldReadOnlyAttributeAttrGetter(v8::Local<v8::String> name, cons
t v8::PropertyCallbackInfo<v8::Value>& info) | 2284 static void perWorldReadOnlyAttributeAttrGetter(v8::Local<v8::String> name, cons
t v8::PropertyCallbackInfo<v8::Value>& info) |
2285 { | 2285 { |
2286 TestObj* imp = V8TestObject::toNative(info.Holder()); | 2286 TestObj* imp = V8TestObject::toNative(info.Holder()); |
2287 RefPtr<TestObj> result = imp->perWorldReadOnlyAttribute(); | 2287 RefPtr<TestObj> result = imp->perWorldReadOnlyAttribute(); |
2288 v8::Handle<v8::Value> wrapper = result.get() ? v8::Handle<v8::Value>(DOMData
Store::getWrapper(result.get(), info.GetIsolate())) : v8Undefined(); | 2288 v8::Handle<v8::Value> wrapper = result.get() ? v8::Handle<v8::Value>(DOMData
Store::getWrapper<V8TestObject>(result.get(), info.GetIsolate())) : v8Undefined(
); |
2289 if (wrapper.IsEmpty()) { | 2289 if (wrapper.IsEmpty()) { |
2290 wrapper = toV8(result.get(), info.Holder(), info.GetIsolate()); | 2290 wrapper = toV8(result.get(), info.Holder(), info.GetIsolate()); |
2291 if (!wrapper.IsEmpty()) | 2291 if (!wrapper.IsEmpty()) |
2292 V8HiddenPropertyName::setNamedHiddenReference(info.Holder(), "perWor
ldReadOnlyAttribute", wrapper); | 2292 V8HiddenPropertyName::setNamedHiddenReference(info.Holder(), "perWor
ldReadOnlyAttribute", wrapper); |
2293 } | 2293 } |
2294 v8SetReturnValue(info, wrapper); | 2294 v8SetReturnValue(info, wrapper); |
2295 return; | 2295 return; |
2296 } | 2296 } |
2297 | 2297 |
2298 static void perWorldReadOnlyAttributeAttrGetterCallback(v8::Local<v8::String> na
me, const v8::PropertyCallbackInfo<v8::Value>& info) | 2298 static void perWorldReadOnlyAttributeAttrGetterCallback(v8::Local<v8::String> na
me, const v8::PropertyCallbackInfo<v8::Value>& info) |
2299 { | 2299 { |
2300 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2300 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2301 TestObjV8Internal::perWorldReadOnlyAttributeAttrGetter(name, info); | 2301 TestObjV8Internal::perWorldReadOnlyAttributeAttrGetter(name, info); |
2302 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 2302 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
2303 } | 2303 } |
2304 | 2304 |
2305 static void perWorldReadOnlyAttributeAttrGetterForMainWorld(v8::Local<v8::String
> name, const v8::PropertyCallbackInfo<v8::Value>& info) | 2305 static void perWorldReadOnlyAttributeAttrGetterForMainWorld(v8::Local<v8::String
> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
2306 { | 2306 { |
2307 TestObj* imp = V8TestObject::toNative(info.Holder()); | 2307 TestObj* imp = V8TestObject::toNative(info.Holder()); |
2308 RefPtr<TestObj> result = imp->perWorldReadOnlyAttribute(); | 2308 RefPtr<TestObj> result = imp->perWorldReadOnlyAttribute(); |
2309 v8::Handle<v8::Value> wrapper = result.get() ? v8::Handle<v8::Value>(DOMData
Store::getWrapperForMainWorld(result.get())) : v8Undefined(); | 2309 v8::Handle<v8::Value> wrapper = result.get() ? v8::Handle<v8::Value>(DOMData
Store::getWrapperForMainWorld<V8TestObject>(result.get())) : v8Undefined(); |
2310 if (wrapper.IsEmpty()) { | 2310 if (wrapper.IsEmpty()) { |
2311 wrapper = toV8(result.get(), info.Holder(), info.GetIsolate()); | 2311 wrapper = toV8(result.get(), info.Holder(), info.GetIsolate()); |
2312 if (!wrapper.IsEmpty()) | 2312 if (!wrapper.IsEmpty()) |
2313 V8HiddenPropertyName::setNamedHiddenReference(info.Holder(), "perWor
ldReadOnlyAttribute", wrapper); | 2313 V8HiddenPropertyName::setNamedHiddenReference(info.Holder(), "perWor
ldReadOnlyAttribute", wrapper); |
2314 } | 2314 } |
2315 v8SetReturnValue(info, wrapper); | 2315 v8SetReturnValue(info, wrapper); |
2316 return; | 2316 return; |
2317 } | 2317 } |
2318 | 2318 |
2319 static void perWorldReadOnlyAttributeAttrGetterCallbackForMainWorld(v8::Local<v8
::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) | 2319 static void perWorldReadOnlyAttributeAttrGetterCallbackForMainWorld(v8::Local<v8
::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
(...skipping 2823 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5143 } | 5143 } |
5144 if (args.Length() <= 0 || !args[0]->IsFunction()) { | 5144 if (args.Length() <= 0 || !args[0]->IsFunction()) { |
5145 throwTypeError(0, args.GetIsolate()); | 5145 throwTypeError(0, args.GetIsolate()); |
5146 return; | 5146 return; |
5147 } | 5147 } |
5148 RefPtr<TestCallback> testCallback = V8TestCallback::create(args[0], getScrip
tExecutionContext()); | 5148 RefPtr<TestCallback> testCallback = V8TestCallback::create(args[0], getScrip
tExecutionContext()); |
5149 | 5149 |
5150 RefPtr<TestObj> impl = TestObj::create(testCallback); | 5150 RefPtr<TestObj> impl = TestObj::create(testCallback); |
5151 v8::Handle<v8::Object> wrapper = args.Holder(); | 5151 v8::Handle<v8::Object> wrapper = args.Holder(); |
5152 | 5152 |
5153 V8DOMWrapper::associateObjectWithWrapper(impl.release(), &V8TestObject::info
, wrapper, args.GetIsolate(), WrapperConfiguration::Dependent); | 5153 V8DOMWrapper::associateObjectWithWrapper<V8TestObject>(impl.release(), &V8Te
stObject::info, wrapper, args.GetIsolate(), WrapperConfiguration::Dependent); |
5154 args.GetReturnValue().Set(wrapper); | 5154 args.GetReturnValue().Set(wrapper); |
5155 } | 5155 } |
5156 | 5156 |
5157 static void indexedPropertyGetter(uint32_t index, const v8::PropertyCallbackInfo
<v8::Value>& info) | 5157 static void indexedPropertyGetter(uint32_t index, const v8::PropertyCallbackInfo
<v8::Value>& info) |
5158 { | 5158 { |
5159 ASSERT(V8DOMWrapper::maybeDOMWrapper(info.Holder())); | 5159 ASSERT(V8DOMWrapper::maybeDOMWrapper(info.Holder())); |
5160 TestObj* collection = V8TestObject::toNative(info.Holder()); | 5160 TestObj* collection = V8TestObject::toNative(info.Holder()); |
5161 RefPtr<Node> element = collection->item(index); | 5161 RefPtr<Node> element = collection->item(index); |
5162 if (!element) | 5162 if (!element) |
5163 return; | 5163 return; |
(...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5725 if (context && context->isDocument() && ContextFeatures::enabledPerContextMe
thod1Enabled(toDocument(context))) | 5725 if (context && context->isDocument() && ContextFeatures::enabledPerContextMe
thod1Enabled(toDocument(context))) |
5726 proto->Set(v8::String::NewSymbol("enabledPerContextMethod1"), v8::Functi
onTemplate::New(TestObjV8Internal::enabledPerContextMethod1MethodCallback, v8Und
efined(), defaultSignature, 1)->GetFunction()); | 5726 proto->Set(v8::String::NewSymbol("enabledPerContextMethod1"), v8::Functi
onTemplate::New(TestObjV8Internal::enabledPerContextMethod1MethodCallback, v8Und
efined(), defaultSignature, 1)->GetFunction()); |
5727 if (context && context->isDocument() && ContextFeatures::featureNameEnabled(
toDocument(context))) | 5727 if (context && context->isDocument() && ContextFeatures::featureNameEnabled(
toDocument(context))) |
5728 proto->Set(v8::String::NewSymbol("enabledPerContextMethod2"), v8::Functi
onTemplate::New(TestObjV8Internal::enabledPerContextMethod2MethodCallback, v8Und
efined(), defaultSignature, 1)->GetFunction()); | 5728 proto->Set(v8::String::NewSymbol("enabledPerContextMethod2"), v8::Functi
onTemplate::New(TestObjV8Internal::enabledPerContextMethod2MethodCallback, v8Und
efined(), defaultSignature, 1)->GetFunction()); |
5729 } | 5729 } |
5730 | 5730 |
5731 | 5731 |
5732 v8::Handle<v8::Object> V8TestObject::createWrapper(PassRefPtr<TestObj> impl, v8:
:Handle<v8::Object> creationContext, v8::Isolate* isolate) | 5732 v8::Handle<v8::Object> V8TestObject::createWrapper(PassRefPtr<TestObj> impl, v8:
:Handle<v8::Object> creationContext, v8::Isolate* isolate) |
5733 { | 5733 { |
5734 ASSERT(impl.get()); | 5734 ASSERT(impl.get()); |
5735 ASSERT(DOMDataStore::getWrapper(impl.get(), isolate).IsEmpty()); | 5735 ASSERT(DOMDataStore::getWrapper<V8TestObject>(impl.get(), isolate).IsEmpty()
); |
5736 | 5736 |
5737 v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext
, &info, impl.get(), isolate); | 5737 v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext
, &info, toInternalPointer(impl.get()), isolate); |
5738 if (UNLIKELY(wrapper.IsEmpty())) | 5738 if (UNLIKELY(wrapper.IsEmpty())) |
5739 return wrapper; | 5739 return wrapper; |
5740 installPerContextProperties(wrapper, impl.get(), isolate); | 5740 installPerContextProperties(wrapper, impl.get(), isolate); |
5741 V8DOMWrapper::associateObjectWithWrapper(impl, &info, wrapper, isolate, Wrap
perConfiguration::Independent); | 5741 V8DOMWrapper::associateObjectWithWrapper<V8TestObject>(impl, &info, wrapper,
isolate, WrapperConfiguration::Independent); |
5742 return wrapper; | 5742 return wrapper; |
5743 } | 5743 } |
5744 void V8TestObject::derefObject(void* object) | 5744 void V8TestObject::derefObject(void* object) |
5745 { | 5745 { |
5746 static_cast<TestObj*>(object)->deref(); | 5746 fromInternalPointer(object)->deref(); |
5747 } | 5747 } |
5748 | 5748 |
5749 } // namespace WebCore | 5749 } // namespace WebCore |
OLD | NEW |