| 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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 // In ScriptWrappable::init, the use of a local function declaration has an issu
e on Windows: | 82 // In ScriptWrappable::init, the use of a local function declaration has an issu
e on Windows: |
| 83 // the local declaration does not pick up the surrounding namespace. Therefore,
we provide this function | 83 // the local declaration does not pick up the surrounding namespace. Therefore,
we provide this function |
| 84 // in the global namespace. | 84 // in the global namespace. |
| 85 // (More info on the MSVC bug here: http://connect.microsoft.com/VisualStudio/fe
edback/details/664619/the-namespace-of-local-function-declarations-in-c) | 85 // (More info on the MSVC bug here: http://connect.microsoft.com/VisualStudio/fe
edback/details/664619/the-namespace-of-local-function-declarations-in-c) |
| 86 void webCoreInitializeScriptWrappableForInterface(WebCore::TestObj* object) | 86 void webCoreInitializeScriptWrappableForInterface(WebCore::TestObj* object) |
| 87 { | 87 { |
| 88 WebCore::initializeScriptWrappableForInterface(object); | 88 WebCore::initializeScriptWrappableForInterface(object); |
| 89 } | 89 } |
| 90 | 90 |
| 91 namespace WebCore { | 91 namespace WebCore { |
| 92 WrapperTypeInfo V8TestObject::info = { V8TestObject::GetTemplate, V8TestObject::
derefObject, 0, V8TestObject::toEventTarget, 0, V8TestObject::installPerContextP
rototypeProperties, &V8EventTarget::info, WrapperTypeObjectPrototype }; | 92 WrapperTypeInfo V8TestObject::info = { V8TestObject::GetTemplate, V8TestObject::
derefObject, 0, V8TestObject::toEventTarget, 0, V8TestObject::installPerContextE
nabledPrototypeProperties, &V8EventTarget::info, WrapperTypeObjectPrototype }; |
| 93 | 93 |
| 94 namespace TestObjV8Internal { | 94 namespace TestObjV8Internal { |
| 95 | 95 |
| 96 template <typename T> void V8_USE(T) { } | 96 template <typename T> void V8_USE(T) { } |
| 97 | 97 |
| 98 static void readOnlyLongAttrAttributeGetter(v8::Local<v8::String> name, const v8
::PropertyCallbackInfo<v8::Value>& info) | 98 static void readOnlyLongAttrAttributeGetter(v8::Local<v8::String> name, const v8
::PropertyCallbackInfo<v8::Value>& info) |
| 99 { | 99 { |
| 100 TestObj* imp = V8TestObject::toNative(info.Holder()); | 100 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 101 v8SetReturnValueInt(info, imp->readOnlyLongAttr()); | 101 v8SetReturnValueInt(info, imp->readOnlyLongAttr()); |
| 102 } | 102 } |
| (...skipping 5392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5495 return V8PerIsolateData::from(isolate)->hasInstance(&info, value, currentWor
ldType); | 5495 return V8PerIsolateData::from(isolate)->hasInstance(&info, value, currentWor
ldType); |
| 5496 } | 5496 } |
| 5497 | 5497 |
| 5498 bool V8TestObject::HasInstanceInAnyWorld(v8::Handle<v8::Value> value, v8::Isolat
e* isolate) | 5498 bool V8TestObject::HasInstanceInAnyWorld(v8::Handle<v8::Value> value, v8::Isolat
e* isolate) |
| 5499 { | 5499 { |
| 5500 return V8PerIsolateData::from(isolate)->hasInstance(&info, value, MainWorld) | 5500 return V8PerIsolateData::from(isolate)->hasInstance(&info, value, MainWorld) |
| 5501 || V8PerIsolateData::from(isolate)->hasInstance(&info, value, IsolatedWo
rld) | 5501 || V8PerIsolateData::from(isolate)->hasInstance(&info, value, IsolatedWo
rld) |
| 5502 || V8PerIsolateData::from(isolate)->hasInstance(&info, value, WorkerWorl
d); | 5502 || V8PerIsolateData::from(isolate)->hasInstance(&info, value, WorkerWorl
d); |
| 5503 } | 5503 } |
| 5504 | 5504 |
| 5505 void V8TestObject::installPerContextProperties(v8::Handle<v8::Object> instance,
TestObj* impl, v8::Isolate* isolate) | 5505 void V8TestObject::installPerContextEnabledProperties(v8::Handle<v8::Object> ins
tance, TestObj* impl, v8::Isolate* isolate) |
| 5506 { | 5506 { |
| 5507 v8::Local<v8::Object> proto = v8::Local<v8::Object>::Cast(instance->GetProto
type()); | 5507 v8::Local<v8::Object> proto = v8::Local<v8::Object>::Cast(instance->GetProto
type()); |
| 5508 if (ContextFeatures::featureNameEnabled(impl->document())) { | 5508 if (ContextFeatures::featureNameEnabled(impl->document())) { |
| 5509 static const V8DOMConfiguration::AttributeConfiguration attributeConf
iguration =\ | 5509 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu
ration =\ |
| 5510 {"enabledPerContextAttr", TestObjV8Internal::enabledPerContextAttrAttrib
uteGetterCallback, TestObjV8Internal::enabledPerContextAttrAttributeSetterCallba
ck, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::Proper
tyAttribute>(v8::None), 0 /* on instance */}; | 5510 {"enabledPerContextAttr", TestObjV8Internal::enabledPerContextAttrAttrib
uteGetterCallback, TestObjV8Internal::enabledPerContextAttrAttributeSetterCallba
ck, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::Proper
tyAttribute>(v8::None), 0 /* on instance */}; |
| 5511 V8DOMConfiguration::installAttribute(instance, proto, attributeConfigura
tion, isolate); | 5511 V8DOMConfiguration::installAttribute(instance, proto, attributeConfigura
tion, isolate); |
| 5512 } | 5512 } |
| 5513 } | 5513 } |
| 5514 | 5514 |
| 5515 void V8TestObject::installPerContextPrototypeProperties(v8::Handle<v8::Object> p
roto, v8::Isolate* isolate) | 5515 void V8TestObject::installPerContextEnabledPrototypeProperties(v8::Handle<v8::Ob
ject> proto, v8::Isolate* isolate) |
| 5516 { | 5516 { |
| 5517 UNUSED_PARAM(proto); | 5517 UNUSED_PARAM(proto); |
| 5518 v8::Local<v8::Signature> defaultSignature = v8::Signature::New(GetTemplate(i
solate, worldType(isolate))); | 5518 v8::Local<v8::Signature> defaultSignature = v8::Signature::New(GetTemplate(i
solate, worldType(isolate))); |
| 5519 UNUSED_PARAM(defaultSignature); | 5519 UNUSED_PARAM(defaultSignature); |
| 5520 | 5520 |
| 5521 ExecutionContext* context = toExecutionContext(proto->CreationContext()); | 5521 ExecutionContext* context = toExecutionContext(proto->CreationContext()); |
| 5522 if (context && context->isDocument() && ContextFeatures::featureNameEnabled(
toDocument(context))) | 5522 if (context && context->isDocument() && ContextFeatures::featureNameEnabled(
toDocument(context))) |
| 5523 proto->Set(v8::String::NewSymbol("enabledPerContextMethod"), v8::Functio
nTemplate::New(TestObjV8Internal::enabledPerContextMethodMethodCallback, v8Undef
ined(), defaultSignature, 1)->GetFunction()); | 5523 proto->Set(v8::String::NewSymbol("enabledPerContextMethod"), v8::Functio
nTemplate::New(TestObjV8Internal::enabledPerContextMethodMethodCallback, v8Undef
ined(), defaultSignature, 1)->GetFunction()); |
| 5524 } | 5524 } |
| 5525 | 5525 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 5536 const WrapperTypeInfo* actualInfo = ScriptWrappable::getTypeInfoFromObje
ct(impl.get()); | 5536 const WrapperTypeInfo* actualInfo = ScriptWrappable::getTypeInfoFromObje
ct(impl.get()); |
| 5537 // Might be a XXXConstructor::info instead of an XXX::info. These will b
oth have | 5537 // Might be a XXXConstructor::info instead of an XXX::info. These will b
oth have |
| 5538 // the same object de-ref functions, though, so use that as the basis of
the check. | 5538 // the same object de-ref functions, though, so use that as the basis of
the check. |
| 5539 RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(actualInfo->derefObjectFunction
== info.derefObjectFunction); | 5539 RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(actualInfo->derefObjectFunction
== info.derefObjectFunction); |
| 5540 } | 5540 } |
| 5541 | 5541 |
| 5542 v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext
, &info, toInternalPointer(impl.get()), isolate); | 5542 v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext
, &info, toInternalPointer(impl.get()), isolate); |
| 5543 if (UNLIKELY(wrapper.IsEmpty())) | 5543 if (UNLIKELY(wrapper.IsEmpty())) |
| 5544 return wrapper; | 5544 return wrapper; |
| 5545 | 5545 |
| 5546 installPerContextProperties(wrapper, impl.get(), isolate); | 5546 installPerContextEnabledProperties(wrapper, impl.get(), isolate); |
| 5547 V8DOMWrapper::associateObjectWithWrapper<V8TestObject>(impl, &info, wrapper,
isolate, WrapperConfiguration::Independent); | 5547 V8DOMWrapper::associateObjectWithWrapper<V8TestObject>(impl, &info, wrapper,
isolate, WrapperConfiguration::Independent); |
| 5548 return wrapper; | 5548 return wrapper; |
| 5549 } | 5549 } |
| 5550 | 5550 |
| 5551 void V8TestObject::derefObject(void* object) | 5551 void V8TestObject::derefObject(void* object) |
| 5552 { | 5552 { |
| 5553 fromInternalPointer(object)->deref(); | 5553 fromInternalPointer(object)->deref(); |
| 5554 } | 5554 } |
| 5555 | 5555 |
| 5556 } // namespace WebCore | 5556 } // namespace WebCore |
| OLD | NEW |