Lower limit on number of nested content frames before giving up. b=126466 r=fabian@bluishgecko.net sr=jst@netscape.com a=rjesup@wgate.com (drivers) a=jaimejr@netscape.com (adt)
git-svn-id: svn://10.0.0.236/trunk@118610 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -106,7 +106,8 @@ static NS_DEFINE_CID(kCChildCID, NS_CHILD_CID);
|
||||
// Bug 8065: Limit content frame depth to some reasonable level.
|
||||
// This does not count chrome frames when determining depth,
|
||||
// nor does it prevent chrome recursion.
|
||||
#define MAX_DEPTH_CONTENT_FRAMES 25
|
||||
// Also see bug 126466.
|
||||
#define MAX_DEPTH_CONTENT_FRAMES 8
|
||||
|
||||
/*******************************************************************************
|
||||
* FrameLoadingInfo
|
||||
@@ -977,8 +978,10 @@ nsHTMLFrameInnerFrame::CreateDocShell(nsIPresContext* aPresContext)
|
||||
nsCOMPtr<nsIDocShellTreeItem> parentAsItem(do_QueryInterface(parentAsSupports));
|
||||
while (parentAsItem) {
|
||||
depth++;
|
||||
if (MAX_DEPTH_CONTENT_FRAMES < depth)
|
||||
if (MAX_DEPTH_CONTENT_FRAMES < depth) {
|
||||
NS_WARNING("Too many nested content frames so giving up");
|
||||
return NS_ERROR_UNEXPECTED; // Too deep, give up! (silently?)
|
||||
}
|
||||
|
||||
// Only count depth on content, not chrome.
|
||||
// If we wanted to limit total depth, skip the following check:
|
||||
|
||||
@@ -106,7 +106,8 @@ static NS_DEFINE_CID(kCChildCID, NS_CHILD_CID);
|
||||
// Bug 8065: Limit content frame depth to some reasonable level.
|
||||
// This does not count chrome frames when determining depth,
|
||||
// nor does it prevent chrome recursion.
|
||||
#define MAX_DEPTH_CONTENT_FRAMES 25
|
||||
// Also see bug 126466.
|
||||
#define MAX_DEPTH_CONTENT_FRAMES 8
|
||||
|
||||
/*******************************************************************************
|
||||
* FrameLoadingInfo
|
||||
@@ -977,8 +978,10 @@ nsHTMLFrameInnerFrame::CreateDocShell(nsIPresContext* aPresContext)
|
||||
nsCOMPtr<nsIDocShellTreeItem> parentAsItem(do_QueryInterface(parentAsSupports));
|
||||
while (parentAsItem) {
|
||||
depth++;
|
||||
if (MAX_DEPTH_CONTENT_FRAMES < depth)
|
||||
if (MAX_DEPTH_CONTENT_FRAMES < depth) {
|
||||
NS_WARNING("Too many nested content frames so giving up");
|
||||
return NS_ERROR_UNEXPECTED; // Too deep, give up! (silently?)
|
||||
}
|
||||
|
||||
// Only count depth on content, not chrome.
|
||||
// If we wanted to limit total depth, skip the following check:
|
||||
|
||||
Reference in New Issue
Block a user