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

Unified Diff: Source/bindings/v8/V8DOMWrapper.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
« no previous file with comments | « Source/bindings/v8/V8DOMConfiguration.cpp ('k') | Source/bindings/v8/V8ErrorHandler.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/v8/V8DOMWrapper.cpp
diff --git a/Source/bindings/v8/V8DOMWrapper.cpp b/Source/bindings/v8/V8DOMWrapper.cpp
index d1049a47db63d0685383b611aac48f34b9ea7e20..ed73ce316cdc416edee8c9ac624c331539faa1ce 100644
--- a/Source/bindings/v8/V8DOMWrapper.cpp
+++ b/Source/bindings/v8/V8DOMWrapper.cpp
@@ -44,17 +44,16 @@ namespace WebCore {
static v8::Local<v8::Object> wrapInShadowTemplate(v8::Local<v8::Object> wrapper, Node* impl, v8::Isolate* isolate)
{
static int shadowTemplateKey; // This address is used for a key to look up the dom template.
- WrapperWorldType currentWorldType = worldType(isolate);
V8PerIsolateData* data = V8PerIsolateData::from(isolate);
- v8::Handle<v8::FunctionTemplate> shadowTemplate = data->existingDOMTemplate(currentWorldType, &shadowTemplateKey);
+ v8::Handle<v8::FunctionTemplate> shadowTemplate = data->existingDOMTemplate(&shadowTemplateKey);
if (shadowTemplate.IsEmpty()) {
shadowTemplate = v8::FunctionTemplate::New(isolate);
if (shadowTemplate.IsEmpty())
return v8::Local<v8::Object>();
shadowTemplate->SetClassName(v8AtomicString(isolate, "HTMLDocument"));
- shadowTemplate->Inherit(V8HTMLDocument::domTemplate(isolate, currentWorldType));
+ shadowTemplate->Inherit(V8HTMLDocument::domTemplate(isolate));
shadowTemplate->InstanceTemplate()->SetInternalFieldCount(V8HTMLDocument::internalFieldCount);
- data->setDOMTemplate(currentWorldType, &shadowTemplateKey, shadowTemplate);
+ data->setDOMTemplate(&shadowTemplateKey, shadowTemplate);
}
v8::Local<v8::Function> shadowConstructor = shadowTemplate->GetFunction();
@@ -74,7 +73,7 @@ v8::Local<v8::Object> V8DOMWrapper::createWrapper(v8::Handle<v8::Object> creatio
V8WrapperInstantiationScope scope(creationContext, isolate);
V8PerContextData* perContextData = V8PerContextData::from(scope.context());
- v8::Local<v8::Object> wrapper = perContextData ? perContextData->createWrapperFromCache(type) : V8ObjectConstructor::newInstance(type->domTemplate(isolate, worldTypeInMainThread(isolate))->GetFunction());
+ v8::Local<v8::Object> wrapper = perContextData ? perContextData->createWrapperFromCache(type) : V8ObjectConstructor::newInstance(type->domTemplate(isolate)->GetFunction());
if (type == &V8HTMLDocument::wrapperTypeInfo && !wrapper.IsEmpty())
wrapper = wrapInShadowTemplate(wrapper, static_cast<Node*>(impl), isolate);
« no previous file with comments | « Source/bindings/v8/V8DOMConfiguration.cpp ('k') | Source/bindings/v8/V8ErrorHandler.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698