Fix UMRs in nsXBLWindowKeyHandler::WalkHandlers. Bug 260312, r+sr=bzbarsky.

This commit is contained in:
bryner%brianryner.com 2004-09-30 03:36:15 +00:00
parent c8e0e9cbec
commit 234716880e
2 changed files with 8 additions and 5 deletions

View File

@ -323,8 +323,12 @@ nsXBLWindowHandler::EnsureHandlers(PRBool *aIsEditor)
{
if (!sXBLSpecialDocInfo)
sXBLSpecialDocInfo = new nsXBLSpecialDocInfo();
if (!sXBLSpecialDocInfo)
if (!sXBLSpecialDocInfo) {
if (aIsEditor) {
*aIsEditor = PR_FALSE;
}
return NS_ERROR_OUT_OF_MEMORY;
}
sXBLSpecialDocInfo->LoadDocInfo();
// Now determine which handlers we should be using.

View File

@ -110,12 +110,11 @@ nsXBLWindowKeyHandler::EnsureHandlers(PRBool *aIsEditor)
{
if (mElement) {
// We are actually a XUL <keyset>.
if (mHandler) {
if (aIsEditor)
*aIsEditor = PR_FALSE;
if (aIsEditor)
*aIsEditor = PR_FALSE;
if (mHandler)
return NS_OK;
}
nsCOMPtr<nsIContent> content(do_QueryInterface(mElement));
BuildHandlerChain(content, &mHandler);