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

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: fix broken patchset 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..fe466c5fff918ee2c71191c186ea507d8a1da966 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,6 +1376,10 @@ void FrameLoader::dispatchDidClearWindowObjectInMainWorld()
if (!m_frame->script().canExecuteScripts(NotAboutToExecuteScript))
return;
+ if (m_dispatchingDidClearWindowObjectInMainWorld)
+ return;
+ TemporaryChange<bool>
+ inDidClearWindowObject(m_dispatchingDidClearWindowObjectInMainWorld, true);
client()->dispatchDidClearWindowObjectInMainWorld();
}
« 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