mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 14:22:01 +00:00
bug 130894, add null checks to avoid crashes found by js debugger users.
r=caillon@returnzero.com, sr=ben, a=asa
This commit is contained in:
parent
c4fa3c40ac
commit
f798d0c82d
@ -918,6 +918,12 @@ nsMenuFrame::OpenMenuInternal(PRBool aActivateFlag)
|
||||
void
|
||||
nsMenuFrame::GetMenuChildrenElement(nsIContent** aResult)
|
||||
{
|
||||
if (!mContent)
|
||||
{
|
||||
*aResult = nsnull;
|
||||
return;
|
||||
}
|
||||
|
||||
nsresult rv;
|
||||
nsCOMPtr<nsIXBLService> xblService =
|
||||
do_GetService("@mozilla.org/xbl;1", &rv);
|
||||
|
@ -391,6 +391,8 @@ nsXULTooltipListener::ShowTooltip()
|
||||
// the tooltip. If there is an attribute on the popup telling us
|
||||
// not to create the auto-hide timer, don't.
|
||||
nsCOMPtr<nsIDOMElement> tooltipEl(do_QueryInterface(mCurrentTooltip));
|
||||
if (!tooltipEl)
|
||||
return NS_ERROR_FAILURE;
|
||||
nsAutoString noAutoHide;
|
||||
tooltipEl->GetAttribute(NS_LITERAL_STRING("noautohide"), noAutoHide);
|
||||
if (noAutoHide != NS_LITERAL_STRING("true"))
|
||||
|
Loading…
Reference in New Issue
Block a user