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

Unified Diff: Source/bindings/v8/custom/V8PromiseCustom.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/v8/custom/V8PromiseCustom.cpp
diff --git a/Source/bindings/v8/custom/V8PromiseCustom.cpp b/Source/bindings/v8/custom/V8PromiseCustom.cpp
index b5e4f16af19e92f027d11181b0eb4bb044e42bd3..8785eb2b967ac61e4cfa29d5450087ef520ef9bb 100644
--- a/Source/bindings/v8/custom/V8PromiseCustom.cpp
+++ b/Source/bindings/v8/custom/V8PromiseCustom.cpp
@@ -61,15 +61,14 @@ namespace {
v8::Local<v8::ObjectTemplate> cachedObjectTemplate(void* domTemplateKey, int internalFieldCount, v8::Isolate* isolate)
{
V8PerIsolateData* data = V8PerIsolateData::from(isolate);
- WrapperWorldType currentWorldType = worldType(isolate);
- v8::Handle<v8::FunctionTemplate> functionDescriptor = data->existingDOMTemplate(currentWorldType, domTemplateKey);
+ v8::Handle<v8::FunctionTemplate> functionDescriptor = data->existingDOMTemplate(domTemplateKey);
if (!functionDescriptor.IsEmpty())
return functionDescriptor->InstanceTemplate();
functionDescriptor = v8::FunctionTemplate::New(isolate);
v8::Local<v8::ObjectTemplate> instanceTemplate = functionDescriptor->InstanceTemplate();
instanceTemplate->SetInternalFieldCount(internalFieldCount);
- data->setDOMTemplate(currentWorldType, domTemplateKey, functionDescriptor);
+ data->setDOMTemplate(domTemplateKey, functionDescriptor);
return instanceTemplate;
}
@@ -681,8 +680,7 @@ void V8PromiseCustom::setState(v8::Handle<v8::Object> internal, PromiseState sta
bool V8PromiseCustom::isPromise(v8::Handle<v8::Value> maybePromise, v8::Isolate* isolate)
{
- WrapperWorldType currentWorldType = worldType(isolate);
- return V8Promise::domTemplate(isolate, currentWorldType)->HasInstance(maybePromise);
+ return V8Promise::domTemplate(isolate)->HasInstance(maybePromise);
}
v8::Local<v8::Object> V8PromiseCustom::toPromise(v8::Handle<v8::Value> maybePromise, v8::Isolate* isolate)
« no previous file with comments | « Source/bindings/v8/custom/V8InjectedScriptManager.cpp ('k') | Source/bindings/v8/custom/V8TypedArrayCustom.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698