From b4af4f3315634824af4048e0c16b667733f8dd45 Mon Sep 17 00:00:00 2001 From: "timeless%mozdev.org" Date: Fri, 31 Jan 2003 21:31:48 +0000 Subject: [PATCH] Bug 156405 Tabbed browsing frequently crashes Mozilla - Trunk M130A [@ nsXULWindow::ContentShellAdded] patch by bsmedberg@covad.net r=roc+moz, sr=roc+moz, a=roc+moz --- layout/base/nsCSSFrameConstructor.cpp | 3 ++- layout/generic/nsFrameFrame.cpp | 3 ++- layout/html/document/src/nsFrameFrame.cpp | 3 ++- layout/html/style/src/nsCSSFrameConstructor.cpp | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/layout/base/nsCSSFrameConstructor.cpp b/layout/base/nsCSSFrameConstructor.cpp index 4fc63033390..dbf07098ab9 100644 --- a/layout/base/nsCSSFrameConstructor.cpp +++ b/layout/base/nsCSSFrameConstructor.cpp @@ -5916,9 +5916,10 @@ nsCSSFrameConstructor::ConstructXULFrame(nsIPresShell* aPresShell, // if the new frame was already initialized to initialize it again. if (!frameHasBeenInitialized) { - InitAndRestoreFrame(aPresContext, aState, aContent, + rv = InitAndRestoreFrame(aPresContext, aState, aContent, geometricParent, aStyleContext, nsnull, newFrame); + NS_ENSURE_SUCCESS(rv,rv); /* // if our parent is a block frame then do things the way html likes it diff --git a/layout/generic/nsFrameFrame.cpp b/layout/generic/nsFrameFrame.cpp index e3a6337683d..4e0fbb94764 100644 --- a/layout/generic/nsFrameFrame.cpp +++ b/layout/generic/nsFrameFrame.cpp @@ -1227,7 +1227,8 @@ nsHTMLFrameInnerFrame::Init(nsIPresContext* aPresContext, } if (shouldCreateDoc) { - ShowDocShell(aPresContext); + rv = ShowDocShell(aPresContext); + NS_ENSURE_SUCCESS(rv,rv); } return NS_OK; diff --git a/layout/html/document/src/nsFrameFrame.cpp b/layout/html/document/src/nsFrameFrame.cpp index e3a6337683d..4e0fbb94764 100644 --- a/layout/html/document/src/nsFrameFrame.cpp +++ b/layout/html/document/src/nsFrameFrame.cpp @@ -1227,7 +1227,8 @@ nsHTMLFrameInnerFrame::Init(nsIPresContext* aPresContext, } if (shouldCreateDoc) { - ShowDocShell(aPresContext); + rv = ShowDocShell(aPresContext); + NS_ENSURE_SUCCESS(rv,rv); } return NS_OK; diff --git a/layout/html/style/src/nsCSSFrameConstructor.cpp b/layout/html/style/src/nsCSSFrameConstructor.cpp index 4fc63033390..dbf07098ab9 100644 --- a/layout/html/style/src/nsCSSFrameConstructor.cpp +++ b/layout/html/style/src/nsCSSFrameConstructor.cpp @@ -5916,9 +5916,10 @@ nsCSSFrameConstructor::ConstructXULFrame(nsIPresShell* aPresShell, // if the new frame was already initialized to initialize it again. if (!frameHasBeenInitialized) { - InitAndRestoreFrame(aPresContext, aState, aContent, + rv = InitAndRestoreFrame(aPresContext, aState, aContent, geometricParent, aStyleContext, nsnull, newFrame); + NS_ENSURE_SUCCESS(rv,rv); /* // if our parent is a block frame then do things the way html likes it