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

Unified Diff: Source/core/frame/LocalFrame.cpp

Issue 657263002: Disallow script execution after unload event dispatch in frame detach. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 2 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
Index: Source/core/frame/LocalFrame.cpp
diff --git a/Source/core/frame/LocalFrame.cpp b/Source/core/frame/LocalFrame.cpp
index 56e289040b2b5e27f1dbe0f989bca8cc83752f11..5c473a10669f085d12946f9ed9c445dd462b1b5c 100644
--- a/Source/core/frame/LocalFrame.cpp
+++ b/Source/core/frame/LocalFrame.cpp
@@ -64,6 +64,7 @@
#include "core/svg/SVGDocumentExtensions.h"
#include "platform/DragImage.h"
#include "platform/RuntimeEnabledFeatures.h"
+#include "platform/ScriptForbiddenScope.h"
#include "platform/graphics/GraphicsContext.h"
#include "platform/graphics/ImageBuffer.h"
#include "platform/text/TextStream.h"
@@ -195,6 +196,8 @@ void LocalFrame::detach()
m_loader.stopAllLoaders();
if (!client())
return;
+
+ ScriptForbiddenScope forbidScript;
m_loader.detach();
setView(nullptr);
willDetachFrameHost();

Powered by Google App Engine
This is Rietveld 408576698