Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(193)

Unified Diff: Source/bindings/tests/results/V8TestInterfaceEventTarget.cpp

Issue 176963017: Remove WrapperWorldType from V8 binding (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/bindings/tests/results/V8TestInterfaceEventTarget.cpp
diff --git a/Source/bindings/tests/results/V8TestInterfaceEventTarget.cpp b/Source/bindings/tests/results/V8TestInterfaceEventTarget.cpp
index 9c95b0522b26b60f1c2fbda0dbfbd3660d7a7eaf..cd0f5d0f9d8f88f690b6cb373c230a2d2ff8774c 100644
--- a/Source/bindings/tests/results/V8TestInterfaceEventTarget.cpp
+++ b/Source/bindings/tests/results/V8TestInterfaceEventTarget.cpp
@@ -102,11 +102,11 @@ static void V8TestInterfaceEventTargetConstructorCallback(const v8::FunctionCall
v8SetReturnValue(info, wrapper);
}
-v8::Handle<v8::FunctionTemplate> V8TestInterfaceEventTargetConstructor::domTemplate(v8::Isolate* isolate, WrapperWorldType currentWorldType)
+v8::Handle<v8::FunctionTemplate> V8TestInterfaceEventTargetConstructor::domTemplate(v8::Isolate* isolate)
{
static int domTemplateKey; // This address is used for a key to look up the dom template.
V8PerIsolateData* data = V8PerIsolateData::from(isolate);
- v8::Local<v8::FunctionTemplate> result = data->existingDOMTemplate(currentWorldType, &domTemplateKey);
+ v8::Local<v8::FunctionTemplate> result = data->existingDOMTemplate(&domTemplateKey);
if (!result.IsEmpty())
return result;
@@ -117,22 +117,21 @@ v8::Handle<v8::FunctionTemplate> V8TestInterfaceEventTargetConstructor::domTempl
v8::Local<v8::ObjectTemplate> instanceTemplate = result->InstanceTemplate();
instanceTemplate->SetInternalFieldCount(V8TestInterfaceEventTarget::internalFieldCount);
result->SetClassName(v8AtomicString(isolate, "TestInterfaceEventTarget"));
- result->Inherit(V8TestInterfaceEventTarget::domTemplate(isolate, currentWorldType));
- data->setDOMTemplate(currentWorldType, &domTemplateKey, result);
-
+ result->Inherit(V8TestInterfaceEventTarget::domTemplate(isolate));
+ data->setDOMTemplate(&domTemplateKey, result);
return scope.Escape(result);
}
-static void configureV8TestInterfaceEventTargetTemplate(v8::Handle<v8::FunctionTemplate> functionTemplate, v8::Isolate* isolate, WrapperWorldType currentWorldType)
+static void configureV8TestInterfaceEventTargetTemplate(v8::Handle<v8::FunctionTemplate> functionTemplate, v8::Isolate* isolate)
{
functionTemplate->ReadOnlyPrototype();
v8::Local<v8::Signature> defaultSignature;
- defaultSignature = V8DOMConfiguration::installDOMClassTemplate(functionTemplate, "TestInterfaceEventTarget", V8EventTarget::domTemplate(isolate, currentWorldType), V8TestInterfaceEventTarget::internalFieldCount,
+ defaultSignature = V8DOMConfiguration::installDOMClassTemplate(functionTemplate, "TestInterfaceEventTarget", V8EventTarget::domTemplate(isolate), V8TestInterfaceEventTarget::internalFieldCount,
0, 0,
0, 0,
0, 0,
- isolate, currentWorldType);
+ isolate);
v8::Local<v8::ObjectTemplate> ALLOW_UNUSED instanceTemplate = functionTemplate->InstanceTemplate();
v8::Local<v8::ObjectTemplate> ALLOW_UNUSED prototypeTemplate = functionTemplate->PrototypeTemplate();
@@ -140,17 +139,17 @@ static void configureV8TestInterfaceEventTargetTemplate(v8::Handle<v8::FunctionT
functionTemplate->Set(v8AtomicString(isolate, "toString"), V8PerIsolateData::current()->toStringTemplate());
}
-v8::Handle<v8::FunctionTemplate> V8TestInterfaceEventTarget::domTemplate(v8::Isolate* isolate, WrapperWorldType currentWorldType)
+v8::Handle<v8::FunctionTemplate> V8TestInterfaceEventTarget::domTemplate(v8::Isolate* isolate)
{
V8PerIsolateData* data = V8PerIsolateData::from(isolate);
- V8PerIsolateData::TemplateMap::iterator result = data->templateMap(currentWorldType).find(&wrapperTypeInfo);
- if (result != data->templateMap(currentWorldType).end())
+ V8PerIsolateData::TemplateMap::iterator result = data->templateMap().find(&wrapperTypeInfo);
+ if (result != data->templateMap().end())
return result->value.newLocal(isolate);
TRACE_EVENT_SCOPED_SAMPLING_STATE("Blink", "BuildDOMTemplate");
v8::Local<v8::FunctionTemplate> templ = v8::FunctionTemplate::New(isolate, V8ObjectConstructor::isValidConstructorMode);
- configureV8TestInterfaceEventTargetTemplate(templ, isolate, currentWorldType);
- data->templateMap(currentWorldType).add(&wrapperTypeInfo, UnsafePersistent<v8::FunctionTemplate>(isolate, templ));
+ configureV8TestInterfaceEventTargetTemplate(templ, isolate);
+ data->templateMap().add(&wrapperTypeInfo, UnsafePersistent<v8::FunctionTemplate>(isolate, templ));
return templ;
}

Powered by Google App Engine
This is Rietveld 408576698