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

Unified Diff: Source/core/loader/FrameLoader.cpp

Issue 1161983005: FrameLoader: Prevent reentrancy on dispatchDidClearWindowObjectInMainWorld. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 7 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/core/loader/FrameLoader.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/loader/FrameLoader.cpp
diff --git a/Source/core/loader/FrameLoader.cpp b/Source/core/loader/FrameLoader.cpp
index df7b71458088ae0c1e25bcdf259046383eddf752..cf1c098634587c950695b081bd5ed5a20f24e0e9 100644
--- a/Source/core/loader/FrameLoader.cpp
+++ b/Source/core/loader/FrameLoader.cpp
@@ -117,6 +117,7 @@ FrameLoader::FrameLoader(LocalFrame* frame)
, m_didAccessInitialDocument(false)
, m_didAccessInitialDocumentTimer(this, &FrameLoader::didAccessInitialDocumentTimerFired)
, m_forcedSandboxFlags(SandboxNone)
+ , m_dispatchingDidClearWindowObjectInMainWorld(false)
{
}
@@ -1375,7 +1376,11 @@ void FrameLoader::dispatchDidClearWindowObjectInMainWorld()
if (!m_frame->script().canExecuteScripts(NotAboutToExecuteScript))
return;
+ if (m_dispatchingDidClearWindowObjectInMainWorld)
+ return;
+ m_dispatchingDidClearWindowObjectInMainWorld = true;
Nate Chapin 2015/05/29 21:28:00 TemporaryChange<bool> inDidClearWindowObject(m_dis
tommycli 2015/05/29 21:36:44 Done.
client()->dispatchDidClearWindowObjectInMainWorld();
+ m_dispatchingDidClearWindowObjectInMainWorld = false;
}
SandboxFlags FrameLoader::effectiveSandboxFlags() const
« no previous file with comments | « Source/core/loader/FrameLoader.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698