| Index: Source/bindings/tests/results/V8TestActiveDOMObject.cpp
|
| diff --git a/Source/bindings/tests/results/V8TestActiveDOMObject.cpp b/Source/bindings/tests/results/V8TestActiveDOMObject.cpp
|
| index 8c8a270e26eeb9ecfd2ddb289140397600583aa6..50c5051534f75bf2cc1c9b1b0c18b10afad2bc73 100644
|
| --- a/Source/bindings/tests/results/V8TestActiveDOMObject.cpp
|
| +++ b/Source/bindings/tests/results/V8TestActiveDOMObject.cpp
|
| @@ -40,7 +40,7 @@ namespace WebCore {
|
| static void initializeScriptWrappableForInterface(TestActiveDOMObject* object)
|
| {
|
| if (ScriptWrappable::wrapperCanBeStoredInObject(object))
|
| - ScriptWrappable::setTypeInfoInObject(object, &V8TestActiveDOMObject::info);
|
| + ScriptWrappable::setTypeInfoInObject(object, &V8TestActiveDOMObject::wrapperTypeInfo);
|
| else
|
| ASSERT_NOT_REACHED();
|
| }
|
| @@ -57,7 +57,7 @@ void webCoreInitializeScriptWrappableForInterface(WebCore::TestActiveDOMObject*
|
| }
|
|
|
| namespace WebCore {
|
| -WrapperTypeInfo V8TestActiveDOMObject::info = { V8TestActiveDOMObject::GetTemplate, V8TestActiveDOMObject::derefObject, 0, 0, 0, V8TestActiveDOMObject::installPerContextEnabledPrototypeProperties, 0, WrapperTypeObjectPrototype };
|
| +WrapperTypeInfo V8TestActiveDOMObject::wrapperTypeInfo = { V8TestActiveDOMObject::GetTemplate, V8TestActiveDOMObject::derefObject, 0, 0, 0, V8TestActiveDOMObject::installPerContextEnabledPrototypeProperties, 0, WrapperTypeObjectPrototype };
|
|
|
| namespace TestActiveDOMObjectV8Internal {
|
|
|
| @@ -139,7 +139,7 @@ static void postMessageAttributeGetter(v8::Local<v8::String> name, const v8::Pro
|
| static const char* privateTemplateUniqueKey = "postMessagePrivateTemplate";
|
| WrapperWorldType currentWorldType = worldType(info.GetIsolate());
|
| V8PerIsolateData* data = V8PerIsolateData::from(info.GetIsolate());
|
| - v8::Handle<v8::FunctionTemplate> privateTemplate = data->privateTemplate(currentWorldType, &privateTemplateUniqueKey, TestActiveDOMObjectV8Internal::postMessageMethodCallback, v8Undefined(), v8::Signature::New(V8PerIsolateData::from(info.GetIsolate())->rawTemplate(&V8TestActiveDOMObject::info, currentWorldType)), 1);
|
| + v8::Handle<v8::FunctionTemplate> privateTemplate = data->privateTemplate(currentWorldType, &privateTemplateUniqueKey, TestActiveDOMObjectV8Internal::postMessageMethodCallback, v8Undefined(), v8::Signature::New(V8PerIsolateData::from(info.GetIsolate())->rawTemplate(&V8TestActiveDOMObject::wrapperTypeInfo, currentWorldType)), 1);
|
|
|
| v8::Handle<v8::Object> holder = info.This()->FindInstanceInPrototypeChain(V8TestActiveDOMObject::GetTemplate(info.GetIsolate(), currentWorldType));
|
| if (holder.IsEmpty()) {
|
| @@ -151,7 +151,7 @@ static void postMessageAttributeGetter(v8::Local<v8::String> name, const v8::Pro
|
| TestActiveDOMObject* imp = V8TestActiveDOMObject::toNative(holder);
|
| if (!BindingSecurity::shouldAllowAccessToFrame(imp->frame(), DoNotReportSecurityError)) {
|
| static const char* sharedTemplateUniqueKey = "postMessageSharedTemplate";
|
| - v8::Handle<v8::FunctionTemplate> sharedTemplate = data->privateTemplate(currentWorldType, &sharedTemplateUniqueKey, TestActiveDOMObjectV8Internal::postMessageMethodCallback, v8Undefined(), v8::Signature::New(V8PerIsolateData::from(info.GetIsolate())->rawTemplate(&V8TestActiveDOMObject::info, currentWorldType)), 1);
|
| + v8::Handle<v8::FunctionTemplate> sharedTemplate = data->privateTemplate(currentWorldType, &sharedTemplateUniqueKey, TestActiveDOMObjectV8Internal::postMessageMethodCallback, v8Undefined(), v8::Signature::New(V8PerIsolateData::from(info.GetIsolate())->rawTemplate(&V8TestActiveDOMObject::wrapperTypeInfo, currentWorldType)), 1);
|
| v8SetReturnValue(info, sharedTemplate->GetFunction());
|
| return;
|
| }
|
| @@ -206,11 +206,11 @@ static v8::Handle<v8::FunctionTemplate> ConfigureV8TestActiveDOMObjectTemplate(v
|
| v8::Local<v8::ObjectTemplate> proto = desc->PrototypeTemplate();
|
| UNUSED_PARAM(instance);
|
| UNUSED_PARAM(proto);
|
| - instance->SetAccessCheckCallbacks(TestActiveDOMObjectV8Internal::namedSecurityCheck, TestActiveDOMObjectV8Internal::indexedSecurityCheck, v8::External::New(&V8TestActiveDOMObject::info));
|
| + instance->SetAccessCheckCallbacks(TestActiveDOMObjectV8Internal::namedSecurityCheck, TestActiveDOMObjectV8Internal::indexedSecurityCheck, v8::External::New(&V8TestActiveDOMObject::wrapperTypeInfo));
|
|
|
| // Custom Signature 'excitingFunction'
|
| const int excitingFunctionArgc = 1;
|
| - v8::Handle<v8::FunctionTemplate> excitingFunctionArgv[excitingFunctionArgc] = { V8PerIsolateData::from(isolate)->rawTemplate(&V8Node::info, currentWorldType) };
|
| + v8::Handle<v8::FunctionTemplate> excitingFunctionArgv[excitingFunctionArgc] = { V8PerIsolateData::from(isolate)->rawTemplate(&V8Node::wrapperTypeInfo, currentWorldType) };
|
| v8::Handle<v8::Signature> excitingFunctionSignature = v8::Signature::New(desc, excitingFunctionArgc, excitingFunctionArgv);
|
| proto->Set(v8::String::NewSymbol("excitingFunction"), v8::FunctionTemplate::New(TestActiveDOMObjectV8Internal::excitingFunctionMethodCallback, v8Undefined(), excitingFunctionSignature, 1));
|
|
|
| @@ -225,28 +225,28 @@ static v8::Handle<v8::FunctionTemplate> ConfigureV8TestActiveDOMObjectTemplate(v
|
| v8::Handle<v8::FunctionTemplate> V8TestActiveDOMObject::GetTemplate(v8::Isolate* isolate, WrapperWorldType currentWorldType)
|
| {
|
| V8PerIsolateData* data = V8PerIsolateData::from(isolate);
|
| - V8PerIsolateData::TemplateMap::iterator result = data->templateMap(currentWorldType).find(&info);
|
| + V8PerIsolateData::TemplateMap::iterator result = data->templateMap(currentWorldType).find(&wrapperTypeInfo);
|
| if (result != data->templateMap(currentWorldType).end())
|
| return result->value.newLocal(isolate);
|
|
|
| TRACE_EVENT_SCOPED_SAMPLING_STATE("Blink", "BuildDOMTemplate");
|
| v8::HandleScope handleScope(isolate);
|
| v8::Handle<v8::FunctionTemplate> templ =
|
| - ConfigureV8TestActiveDOMObjectTemplate(data->rawTemplate(&info, currentWorldType), isolate, currentWorldType);
|
| - data->templateMap(currentWorldType).add(&info, UnsafePersistent<v8::FunctionTemplate>(isolate, templ));
|
| + ConfigureV8TestActiveDOMObjectTemplate(data->rawTemplate(&wrapperTypeInfo, currentWorldType), isolate, currentWorldType);
|
| + data->templateMap(currentWorldType).add(&wrapperTypeInfo, UnsafePersistent<v8::FunctionTemplate>(isolate, templ));
|
| return handleScope.Close(templ);
|
| }
|
|
|
| bool V8TestActiveDOMObject::HasInstance(v8::Handle<v8::Value> jsValue, v8::Isolate* isolate, WrapperWorldType currentWorldType)
|
| {
|
| - return V8PerIsolateData::from(isolate)->hasInstance(&info, jsValue, currentWorldType);
|
| + return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, jsValue, currentWorldType);
|
| }
|
|
|
| bool V8TestActiveDOMObject::HasInstanceInAnyWorld(v8::Handle<v8::Value> jsValue, v8::Isolate* isolate)
|
| {
|
| - return V8PerIsolateData::from(isolate)->hasInstance(&info, jsValue, MainWorld)
|
| - || V8PerIsolateData::from(isolate)->hasInstance(&info, jsValue, IsolatedWorld)
|
| - || V8PerIsolateData::from(isolate)->hasInstance(&info, jsValue, WorkerWorld);
|
| + return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, jsValue, MainWorld)
|
| + || V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, jsValue, IsolatedWorld)
|
| + || V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, jsValue, WorkerWorld);
|
| }
|
|
|
| v8::Handle<v8::Object> V8TestActiveDOMObject::createWrapper(PassRefPtr<TestActiveDOMObject> impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
|
| @@ -255,17 +255,17 @@ v8::Handle<v8::Object> V8TestActiveDOMObject::createWrapper(PassRefPtr<TestActiv
|
| ASSERT(!DOMDataStore::containsWrapper<V8TestActiveDOMObject>(impl.get(), isolate));
|
| if (ScriptWrappable::wrapperCanBeStoredInObject(impl.get())) {
|
| const WrapperTypeInfo* actualInfo = ScriptWrappable::getTypeInfoFromObject(impl.get());
|
| - // Might be a XXXConstructor::info instead of an XXX::info. These will both have
|
| + // Might be a XXXConstructor::wrapperTypeInfo instead of an XXX::wrapperTypeInfo. These will both have
|
| // the same object de-ref functions, though, so use that as the basis of the check.
|
| - RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(actualInfo->derefObjectFunction == info.derefObjectFunction);
|
| + RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(actualInfo->derefObjectFunction == wrapperTypeInfo.derefObjectFunction);
|
| }
|
|
|
| - v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext, &info, toInternalPointer(impl.get()), isolate);
|
| + v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext, &wrapperTypeInfo, toInternalPointer(impl.get()), isolate);
|
| if (UNLIKELY(wrapper.IsEmpty()))
|
| return wrapper;
|
|
|
| installPerContextEnabledProperties(wrapper, impl.get(), isolate);
|
| - V8DOMWrapper::associateObjectWithWrapper<V8TestActiveDOMObject>(impl, &info, wrapper, isolate, WrapperConfiguration::Independent);
|
| + V8DOMWrapper::associateObjectWithWrapper<V8TestActiveDOMObject>(impl, &wrapperTypeInfo, wrapper, isolate, WrapperConfiguration::Independent);
|
| return wrapper;
|
| }
|
|
|
|
|