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

Unified Diff: Source/bindings/v8/V8DOMWrapper.cpp

Issue 23876015: Pass isolate to v8::Local<>::New() factory function (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Use isolateForFrame() Created 7 years, 3 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/V8DOMWrapper.cpp
diff --git a/Source/bindings/v8/V8DOMWrapper.cpp b/Source/bindings/v8/V8DOMWrapper.cpp
index b725c3d38b223de5cbf4f25f4698dd3e8810e9a1..29354fb67c510d5a53a5adced840877770be9e15 100644
--- a/Source/bindings/v8/V8DOMWrapper.cpp
+++ b/Source/bindings/v8/V8DOMWrapper.cpp
@@ -44,7 +44,7 @@ namespace WebCore {
class V8WrapperInstantiationScope {
public:
- explicit V8WrapperInstantiationScope(v8::Handle<v8::Object> creationContext)
+ V8WrapperInstantiationScope(v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
: m_didEnterContext(false)
, m_context(v8::Context::GetCurrent())
{
@@ -58,7 +58,7 @@ public:
// is different from the context that we are about to enter.
if (contextForWrapper == m_context)
return;
- m_context = v8::Local<v8::Context>::New(contextForWrapper);
+ m_context = v8::Local<v8::Context>::New(isolate, contextForWrapper);
m_didEnterContext = true;
m_context->Enter();
}
@@ -108,7 +108,7 @@ static v8::Local<v8::Object> wrapInShadowTemplate(v8::Local<v8::Object> wrapper,
v8::Local<v8::Object> V8DOMWrapper::createWrapper(v8::Handle<v8::Object> creationContext, WrapperTypeInfo* type, void* impl, v8::Isolate* isolate)
{
- V8WrapperInstantiationScope scope(creationContext);
+ V8WrapperInstantiationScope scope(creationContext, isolate);
V8PerContextData* perContextData = V8PerContextData::from(scope.context());
v8::Local<v8::Object> wrapper = perContextData ? perContextData->createWrapperFromCache(type) : V8ObjectConstructor::newInstance(type->getTemplate(isolate, worldTypeInMainThread(isolate))->GetFunction());

Powered by Google App Engine
This is Rietveld 408576698