Be sure to initialize out-param no matter what. b=127360 r=aaronl sr=brendan a=asa (drivers)

This commit is contained in:
attinasi%netscape.com 2002-03-19 00:32:41 +00:00
Родитель 16b9d14382
Коммит 8d198eefbd
2 изменённых файлов: 6 добавлений и 4 удалений

Просмотреть файл

@ -600,10 +600,11 @@ FrameManager::GetCanvasFrame(nsIPresContext* aPresContext, nsIFrame** aCanvasFra
NS_IMETHODIMP
FrameManager::GetPrimaryFrameFor(nsIContent* aContent, nsIFrame** aResult)
{
NS_ASSERTION(aResult, "null out-param not supported");
*aResult = nsnull; // initialize out param (before possibly returning due to null args/members)
NS_ENSURE_TRUE(mPresShell, NS_ERROR_NOT_AVAILABLE);
NS_ENSURE_ARG_POINTER(aResult);
NS_ENSURE_ARG_POINTER(aContent);
*aResult = nsnull; // initialize out param
if (mIsDestroyingFrames) {
#ifdef DEBUG

Просмотреть файл

@ -600,10 +600,11 @@ FrameManager::GetCanvasFrame(nsIPresContext* aPresContext, nsIFrame** aCanvasFra
NS_IMETHODIMP
FrameManager::GetPrimaryFrameFor(nsIContent* aContent, nsIFrame** aResult)
{
NS_ASSERTION(aResult, "null out-param not supported");
*aResult = nsnull; // initialize out param (before possibly returning due to null args/members)
NS_ENSURE_TRUE(mPresShell, NS_ERROR_NOT_AVAILABLE);
NS_ENSURE_ARG_POINTER(aResult);
NS_ENSURE_ARG_POINTER(aContent);
*aResult = nsnull; // initialize out param
if (mIsDestroyingFrames) {
#ifdef DEBUG