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

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

Issue 1170413003: Add a scoping object to help block scripting during plugin destruction. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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 b44f18ae23f8d902b07023877479e0e457519d33..c8d6821920286ee11ce221a4891440ae3854c8b6 100644
--- a/Source/core/frame/LocalFrame.cpp
+++ b/Source/core/frame/LocalFrame.cpp
@@ -65,6 +65,7 @@
#include "core/paint/TransformRecorder.h"
#include "core/svg/SVGDocumentExtensions.h"
#include "platform/DragImage.h"
+#include "platform/ReentrantScriptForbiddenScope.h"
#include "platform/RuntimeEnabledFeatures.h"
#include "platform/ScriptForbiddenScope.h"
#include "platform/graphics/GraphicsContext.h"
@@ -274,6 +275,7 @@ void LocalFrame::reload(FrameLoadType loadType, ClientRedirectPolicy clientRedir
void LocalFrame::detach()
{
+ ReentrantScriptForbiddenScope forbidPluginDestructorScripting;
// A lot of the following steps can result in the current frame being
// detached, so protect a reference to it.
RefPtrWillBeRawPtr<LocalFrame> protect(this);

Powered by Google App Engine
This is Rietveld 408576698