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

Unified Diff: Source/core/frame/RemoteFrame.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/RemoteFrame.cpp
diff --git a/Source/core/frame/RemoteFrame.cpp b/Source/core/frame/RemoteFrame.cpp
index 908c082b1955071847f9ee95fc52df6464ad6226..2e78d105a2bdefc1a88dc7569c36a8b6dd9085ff 100644
--- a/Source/core/frame/RemoteFrame.cpp
+++ b/Source/core/frame/RemoteFrame.cpp
@@ -15,6 +15,7 @@
#include "core/layout/LayoutPart.h"
#include "core/loader/FrameLoadRequest.h"
#include "core/paint/DeprecatedPaintLayer.h"
+#include "platform/ReentrantScriptForbiddenScope.h"
#include "platform/UserGestureIndicator.h"
#include "platform/graphics/GraphicsLayer.h"
#include "platform/weborigin/SecurityPolicy.h"
@@ -84,6 +85,7 @@ void RemoteFrame::reload(FrameLoadType frameLoadType, ClientRedirectPolicy clien
void RemoteFrame::detach()
{
+ ReentrantScriptForbiddenScope forbidPluginDestructorScripting;
// Frame::detach() requires the caller to keep a reference to this, since
// otherwise it may clear the last reference to this, causing it to be
// deleted, which can cause a use-after-free.

Powered by Google App Engine
This is Rietveld 408576698