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

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

Issue 186633002: Change RefPtr<DOMWrapperWorld> that causes reference cycles to DOMWrapperWorld* Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 10 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/ScriptController.h ('k') | Source/bindings/v8/SerializedScriptValue.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/v8/ScriptController.cpp
diff --git a/Source/bindings/v8/ScriptController.cpp b/Source/bindings/v8/ScriptController.cpp
index cae9555cbc3d5d3a2cca4c62dcfad66a15379923..80a4fe1e20142193046a7954c7669a84aa523735 100644
--- a/Source/bindings/v8/ScriptController.cpp
+++ b/Source/bindings/v8/ScriptController.cpp
@@ -237,8 +237,9 @@ V8WindowShell* ScriptController::existingWindowShell(DOMWrapperWorld* world)
return iter->value->isContextInitialized() ? iter->value.get() : 0;
}
-V8WindowShell* ScriptController::windowShell(DOMWrapperWorld* world)
+V8WindowShell* ScriptController::windowShell(PassRefPtr<DOMWrapperWorld> prpWorld)
{
+ RefPtr<DOMWrapperWorld> world = prpWorld;
ASSERT(world);
V8WindowShell* shell = 0;
@@ -255,7 +256,7 @@ V8WindowShell* ScriptController::windowShell(DOMWrapperWorld* world)
}
}
if (!shell->isContextInitialized() && shell->initializeIfNeeded())
- m_frame->loader().dispatchDidClearWindowObjectInWorld(world);
+ m_frame->loader().dispatchDidClearWindowObjectInWorld(world.get());
return shell;
}
@@ -628,8 +629,7 @@ void ScriptController::executeScriptInIsolatedWorld(int worldID, const Vector<Sc
v8::Local<v8::Array> v8Results;
{
v8::EscapableHandleScope evaluateHandleScope(m_isolate);
- RefPtr<DOMWrapperWorld> world = DOMWrapperWorld::ensureIsolatedWorld(worldID, extensionGroup);
- V8WindowShell* isolatedWorldShell = windowShell(world.get());
+ V8WindowShell* isolatedWorldShell = windowShell(DOMWrapperWorld::ensureIsolatedWorld(worldID, extensionGroup));
if (!isolatedWorldShell->isContextInitialized())
return;
« no previous file with comments | « Source/bindings/v8/ScriptController.h ('k') | Source/bindings/v8/SerializedScriptValue.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698