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

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

Issue 460053002: Add a comment about calling clearScriptObjects before clearForNavigation. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/core/v8/ScriptController.cpp
diff --git a/Source/bindings/core/v8/ScriptController.cpp b/Source/bindings/core/v8/ScriptController.cpp
index 06a944a7803480008e686d95b58514c72f7dda1e..ef014a04a86078131552d7de3a07a432ce0afbab 100644
--- a/Source/bindings/core/v8/ScriptController.cpp
+++ b/Source/bindings/core/v8/ScriptController.cpp
@@ -421,6 +421,9 @@ void ScriptController::clearWindowShell()
double start = currentTime();
// V8 binding expects ScriptController::clearWindowShell only be called
// when a frame is loading a new page. This creates a new context for the new page.
+
+ // The V8 context must be available for |clearScriptObjects()|.
+ // The below call must be before |clearForNavigation()| which disposes the V8 context.
clearScriptObjects();
m_windowShell->clearForNavigation();
for (IsolatedWorldMap::iterator iter = m_isolatedWorlds.begin(); iter != m_isolatedWorlds.end(); ++iter)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698