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

Unified Diff: third_party/WebKit/Source/core/html/HTMLFrameElementBase.cpp

Issue 2497133002: Add a SECURITY_CHECK that HTMLFrameElementBase is a consistent state.
Patch Set: Created 4 years, 1 month 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 | « no previous file | 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/html/HTMLFrameElementBase.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLFrameElementBase.cpp b/third_party/WebKit/Source/core/html/HTMLFrameElementBase.cpp
index eb81d639c4de017fbb4adf4c46265078a85c0f43..723915b680ee339c1e492a8c9135b7fcadbd2323 100644
--- a/third_party/WebKit/Source/core/html/HTMLFrameElementBase.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLFrameElementBase.cpp
@@ -38,6 +38,7 @@
#include "core/loader/FrameLoaderClient.h"
#include "core/page/FocusController.h"
#include "core/page/Page.h"
+#include "wtf/Assertions.h"
namespace blink {
@@ -187,6 +188,10 @@ void HTMLFrameElementBase::didNotifySubtreeInsertionsToDocument() {
if (!SubframeLoadingDisabler::canLoadFrame(*this))
return;
+ // If there's a content frame already attached, the DOM is already in an
+ // inconsistent state. It's dangerous to continue, so just abort.
+ SECURITY_CHECK(!contentFrame());
+
setNameAndOpenURL();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698