зеркало из https://github.com/mozilla/gecko-dev.git
Be sure to initialize out-param no matter what. b=127360 r=aaronl sr=brendan a=asa (drivers)
This commit is contained in:
Родитель
16b9d14382
Коммит
8d198eefbd
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче