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

Unified Diff: Source/web/WebFrameImpl.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
« no previous file with comments | « Source/bindings/v8/V8WorkerGlobalScopeEventListener.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebFrameImpl.cpp
diff --git a/Source/web/WebFrameImpl.cpp b/Source/web/WebFrameImpl.cpp
index 4164e8820bce07b124cb7fedbe4533dab24711d5..2ae352a784a8bc2189f986afa5872da269e86052 100644
--- a/Source/web/WebFrameImpl.cpp
+++ b/Source/web/WebFrameImpl.cpp
@@ -857,7 +857,7 @@ void WebFrameImpl::executeScriptInIsolatedWorld(int worldID, const WebScriptSour
frame()->script()->executeScriptInIsolatedWorld(worldID, sources, extensionGroup, &scriptResults);
WebVector<v8::Local<v8::Value> > v8Results(scriptResults.size());
for (unsigned i = 0; i < scriptResults.size(); i++)
- v8Results[i] = v8::Local<v8::Value>::New(scriptResults[i].v8Value());
+ v8Results[i] = v8::Local<v8::Value>::New(isolateForFrame(frame()), scriptResults[i].v8Value());
results->swap(v8Results);
} else
frame()->script()->executeScriptInIsolatedWorld(worldID, sources, extensionGroup, 0);
@@ -879,7 +879,7 @@ v8::Local<v8::Context> WebFrameImpl::mainWorldScriptContext() const
v8::Handle<v8::Value> WebFrameImpl::createFileSystem(WebFileSystemType type, const WebString& name, const WebString& path)
{
ASSERT(frame());
- return toV8(DOMFileSystem::create(frame()->document(), name, static_cast<WebCore::FileSystemType>(type), KURL(ParsedURLString, path.utf8().data())), v8::Handle<v8::Object>(), frame()->script()->currentWorldContext()->GetIsolate());
+ return toV8(DOMFileSystem::create(frame()->document(), name, static_cast<WebCore::FileSystemType>(type), KURL(ParsedURLString, path.utf8().data())), v8::Handle<v8::Object>(), isolateForFrame(frame()));
abarth-chromium 2013/09/13 17:47:08 Should we just call isolateForFrame toIsolate? We
}
v8::Handle<v8::Value> WebFrameImpl::createSerializableFileSystem(WebFileSystemType type, const WebString& name, const WebString& path)
@@ -887,7 +887,7 @@ v8::Handle<v8::Value> WebFrameImpl::createSerializableFileSystem(WebFileSystemTy
ASSERT(frame());
RefPtr<DOMFileSystem> fileSystem = DOMFileSystem::create(frame()->document(), name, static_cast<WebCore::FileSystemType>(type), KURL(ParsedURLString, path.utf8().data()));
fileSystem->makeClonable();
- return toV8(fileSystem.release(), v8::Handle<v8::Object>(), frame()->script()->currentWorldContext()->GetIsolate());
+ return toV8(fileSystem.release(), v8::Handle<v8::Object>(), isolateForFrame(frame()));
}
v8::Handle<v8::Value> WebFrameImpl::createFileEntry(WebFileSystemType type, const WebString& fileSystemName, const WebString& fileSystemPath, const WebString& filePath, bool isDirectory)
@@ -896,8 +896,8 @@ v8::Handle<v8::Value> WebFrameImpl::createFileEntry(WebFileSystemType type, cons
RefPtr<DOMFileSystemBase> fileSystem = DOMFileSystem::create(frame()->document(), fileSystemName, static_cast<WebCore::FileSystemType>(type), KURL(ParsedURLString, fileSystemPath.utf8().data()));
if (isDirectory)
- return toV8(DirectoryEntry::create(fileSystem, filePath), v8::Handle<v8::Object>(), frame()->script()->currentWorldContext()->GetIsolate());
- return toV8(FileEntry::create(fileSystem, filePath), v8::Handle<v8::Object>(), frame()->script()->currentWorldContext()->GetIsolate());
+ return toV8(DirectoryEntry::create(fileSystem, filePath), v8::Handle<v8::Object>(), isolateForFrame(frame()));
+ return toV8(FileEntry::create(fileSystem, filePath), v8::Handle<v8::Object>(), isolateForFrame(frame()));
}
void WebFrameImpl::reload(bool ignoreCache)
« no previous file with comments | « Source/bindings/v8/V8WorkerGlobalScopeEventListener.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698