mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 385716 inIFlasher.drawElementOutline and inIFlasher.repaintElement aren't null safe [@ inLayoutUtils::GetWindowFor]
r=bz sr=bz
This commit is contained in:
parent
63aa4a87a2
commit
04f25bd738
@ -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…
Reference in New Issue
Block a user