зеркало из https://github.com/mozilla/gecko-dev.git
Bug 385716 inIFlasher.drawElementOutline and inIFlasher.repaintElement aren't null safe [@ inLayoutUtils::GetWindowFor]
r=bz sr=bz
This commit is contained in:
Родитель
9da968b142
Коммит
51244bcf9d
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче