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

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

Issue 2395423002: Check if an iframe doesn't get detached twice
Patch Set: Created 4 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
« no previous file with comments | « third_party/WebKit/Source/core/frame/LocalFrame.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/frame/LocalFrame.cpp
diff --git a/third_party/WebKit/Source/core/frame/LocalFrame.cpp b/third_party/WebKit/Source/core/frame/LocalFrame.cpp
index 4f3f496b44233d9d1cbcaaca20c459b07bbd1504..9c68c203efb661ccf37b06829cd686d2df954288 100644
--- a/third_party/WebKit/Source/core/frame/LocalFrame.cpp
+++ b/third_party/WebKit/Source/core/frame/LocalFrame.cpp
@@ -379,6 +379,9 @@ void LocalFrame::reload(FrameLoadType loadType,
}
void LocalFrame::detach(FrameDetachType type) {
+ CHECK(!m_detached);
+ m_detached = true;
+
PluginScriptForbiddenScope forbidPluginDestructorScripting;
m_loader.stopAllLoaders();
dcheng 2016/10/08 04:59:50 This can run script by causing a frame to be consi
// Don't allow any new child frames to load in this frame: attaching a new
@@ -855,7 +858,8 @@ inline LocalFrame::LocalFrame(FrameLoaderClient* client,
m_pageZoomFactor(parentPageZoomFactor(this)),
m_textZoomFactor(parentTextZoomFactor(this)),
m_inViewSourceMode(false),
- m_interfaceProvider(interfaceProvider) {
+ m_interfaceProvider(interfaceProvider),
+ m_detached(false) {
if (isLocalRoot())
m_instrumentingAgents = new InstrumentingAgents();
else
« no previous file with comments | « third_party/WebKit/Source/core/frame/LocalFrame.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698