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

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
« Source/core/loader/FrameLoader.h ('K') | « 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..ed9202e376002b2b2ecdc8817d3d41fe9be911e5 100644
--- a/Source/core/loader/FrameLoader.cpp
+++ b/Source/core/loader/FrameLoader.cpp
@@ -1372,10 +1372,16 @@ void FrameLoader::dispatchDidClearDocumentOfWindowObject()
void FrameLoader::dispatchDidClearWindowObjectInMainWorld()
{
+ if (m_dispatchingDidClearWindowObjectInMainWorld)
chrishtr 2015/05/28 22:09:25 I think you should do this instead: if (m_dispatc
tommycli 2015/05/28 22:19:36 Done.
+ return;
+ m_dispatchingDidClearWindowObjectInMainWorld = true;
+
if (!m_frame->script().canExecuteScripts(NotAboutToExecuteScript))
return;
client()->dispatchDidClearWindowObjectInMainWorld();
+
+ m_dispatchingDidClearWindowObjectInMainWorld = false;
}
SandboxFlags FrameLoader::effectiveSandboxFlags() const
« Source/core/loader/FrameLoader.h ('K') | « Source/core/loader/FrameLoader.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698