Index: Source/core/html/HTMLFrameOwnerElement.cpp |
=================================================================== |
--- Source/core/html/HTMLFrameOwnerElement.cpp (revision 198700) |
+++ Source/core/html/HTMLFrameOwnerElement.cpp (working copy) |
@@ -26,6 +26,7 @@ |
#include "core/dom/AXObjectCache.h" |
#include "core/dom/ExceptionCode.h" |
#include "core/events/Event.h" |
+#include "core/frame/FrameHost.h" |
#include "core/frame/FrameView.h" |
#include "core/frame/LocalFrame.h" |
#include "core/layout/LayoutPart.h" |
@@ -257,6 +258,9 @@ |
if (!SubframeLoadingDisabler::canLoadFrame(*this)) |
return false; |
+ if (document().frame()->host()->subframeCount() >= FrameHost::maxNumberOfFrames) |
+ return false; |
+ |
return parentFrame->loader().client()->createFrame(FrameLoadRequest(&document(), url, "_self", CheckContentSecurityPolicy), frameName, this); |
} |