Bug 385716 inIFlasher.drawElementOutline and inIFlasher.repaintElement aren't null safe [@ inLayoutUtils::GetWindowFor]
r=bz sr=bz git-svn-id: svn://10.0.0.236/trunk@229101 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
2475e961e4
commit
a7fb9549ab
@ -134,6 +134,7 @@ inFlasher::SetInvert(PRBool aInvert)
|
||||
NS_IMETHODIMP
|
||||
inFlasher::RepaintElement(nsIDOMElement* aElement)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aElement);
|
||||
nsCOMPtr<nsIDOMWindowInternal> window = inLayoutUtils::GetWindowFor(aElement);
|
||||
if (!window) return NS_OK;
|
||||
nsCOMPtr<nsIPresShell> presShell = inLayoutUtils::GetPresShellFor(window);
|
||||
@ -149,6 +150,7 @@ inFlasher::RepaintElement(nsIDOMElement* aElement)
|
||||
NS_IMETHODIMP
|
||||
inFlasher::DrawElementOutline(nsIDOMElement* aElement)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aElement);
|
||||
nsCOMPtr<nsIDOMWindowInternal> window = inLayoutUtils::GetWindowFor(aElement);
|
||||
if (!window) return NS_OK;
|
||||
nsCOMPtr<nsIPresShell> presShell = inLayoutUtils::GetPresShellFor(window);
|
||||
@ -183,8 +185,7 @@ inFlasher::DrawElementOutline(nsIDOMElement* aElement)
|
||||
NS_IMETHODIMP
|
||||
inFlasher::ScrollElementIntoView(nsIDOMElement *aElement)
|
||||
{
|
||||
NS_PRECONDITION(aElement, "Dude, where's my arg?!");
|
||||
|
||||
NS_ENSURE_ARG_POINTER(aElement);
|
||||
nsCOMPtr<nsIDOMWindowInternal> window = inLayoutUtils::GetWindowFor(aElement);
|
||||
if (!window) {
|
||||
return NS_OK;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user