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

Unified Diff: Source/bindings/core/v8/DOMWrapperWorld.cpp

Issue 707213002: bindings: Explicitly passes a v8::Isolate to DOMDataStore. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Addressed a review comment. Created 6 years, 1 month 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/core/v8/DOMWrapperWorld.h ('k') | Source/bindings/core/v8/PageScriptDebugServer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/core/v8/DOMWrapperWorld.cpp
diff --git a/Source/bindings/core/v8/DOMWrapperWorld.cpp b/Source/bindings/core/v8/DOMWrapperWorld.cpp
index b1fd79fb08cf899362a2a2d216a7ab0e3ee90e63..aa2a07d9463b31dd05b9e223c1497b789e312aea 100644
--- a/Source/bindings/core/v8/DOMWrapperWorld.cpp
+++ b/Source/bindings/core/v8/DOMWrapperWorld.cpp
@@ -48,22 +48,22 @@ namespace blink {
unsigned DOMWrapperWorld::isolatedWorldCount = 0;
DOMWrapperWorld* DOMWrapperWorld::worldOfInitializingWindow = 0;
-PassRefPtr<DOMWrapperWorld> DOMWrapperWorld::create(int worldId, int extensionGroup)
+PassRefPtr<DOMWrapperWorld> DOMWrapperWorld::create(v8::Isolate* isolate, int worldId, int extensionGroup)
{
- return adoptRef(new DOMWrapperWorld(worldId, extensionGroup));
+ return adoptRef(new DOMWrapperWorld(isolate, worldId, extensionGroup));
}
-DOMWrapperWorld::DOMWrapperWorld(int worldId, int extensionGroup)
+DOMWrapperWorld::DOMWrapperWorld(v8::Isolate* isolate, int worldId, int extensionGroup)
: m_worldId(worldId)
, m_extensionGroup(extensionGroup)
- , m_domDataStore(adoptPtr(new DOMDataStore(isMainWorld())))
+ , m_domDataStore(adoptPtr(new DOMDataStore(isolate, isMainWorld())))
{
}
DOMWrapperWorld& DOMWrapperWorld::mainWorld()
{
ASSERT(isMainThread());
- DEFINE_STATIC_REF(DOMWrapperWorld, cachedMainWorld, (DOMWrapperWorld::create(MainWorldId, mainWorldExtensionGroup)));
+ DEFINE_STATIC_REF(DOMWrapperWorld, cachedMainWorld, (DOMWrapperWorld::create(v8::Isolate::GetCurrent(), MainWorldId, mainWorldExtensionGroup)));
return *cachedMainWorld;
}
@@ -72,7 +72,7 @@ DOMWrapperWorld& DOMWrapperWorld::privateScriptIsolatedWorld()
ASSERT(isMainThread());
DEFINE_STATIC_LOCAL(RefPtr<DOMWrapperWorld>, cachedPrivateScriptIsolatedWorld, ());
if (!cachedPrivateScriptIsolatedWorld) {
- cachedPrivateScriptIsolatedWorld = DOMWrapperWorld::create(PrivateScriptIsolatedWorldId, privateScriptIsolatedWorldExtensionGroup);
+ cachedPrivateScriptIsolatedWorld = DOMWrapperWorld::create(v8::Isolate::GetCurrent(), PrivateScriptIsolatedWorldId, privateScriptIsolatedWorldExtensionGroup);
isolatedWorldCount++;
}
return *cachedPrivateScriptIsolatedWorld;
@@ -129,7 +129,7 @@ static bool isIsolatedWorldId(int worldId)
}
#endif
-PassRefPtr<DOMWrapperWorld> DOMWrapperWorld::ensureIsolatedWorld(int worldId, int extensionGroup)
+PassRefPtr<DOMWrapperWorld> DOMWrapperWorld::ensureIsolatedWorld(v8::Isolate* isolate, int worldId, int extensionGroup)
{
ASSERT(isIsolatedWorldId(worldId));
@@ -142,7 +142,7 @@ PassRefPtr<DOMWrapperWorld> DOMWrapperWorld::ensureIsolatedWorld(int worldId, in
return world.release();
}
- world = DOMWrapperWorld::create(worldId, extensionGroup);
+ world = DOMWrapperWorld::create(isolate, worldId, extensionGroup);
result.storedValue->value = world.get();
isolatedWorldCount++;
return world.release();
« no previous file with comments | « Source/bindings/core/v8/DOMWrapperWorld.h ('k') | Source/bindings/core/v8/PageScriptDebugServer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698