diff --git a/layout/inspector/src/inFlasher.cpp b/layout/inspector/src/inFlasher.cpp index deb83d37ee74..7297f887b951 100644 --- a/layout/inspector/src/inFlasher.cpp +++ b/layout/inspector/src/inFlasher.cpp @@ -134,6 +134,7 @@ inFlasher::SetInvert(PRBool aInvert) NS_IMETHODIMP inFlasher::RepaintElement(nsIDOMElement* aElement) { + NS_ENSURE_ARG_POINTER(aElement); nsCOMPtr window = inLayoutUtils::GetWindowFor(aElement); if (!window) return NS_OK; nsCOMPtr presShell = inLayoutUtils::GetPresShellFor(window); @@ -149,6 +150,7 @@ inFlasher::RepaintElement(nsIDOMElement* aElement) NS_IMETHODIMP inFlasher::DrawElementOutline(nsIDOMElement* aElement) { + NS_ENSURE_ARG_POINTER(aElement); nsCOMPtr window = inLayoutUtils::GetWindowFor(aElement); if (!window) return NS_OK; nsCOMPtr 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 window = inLayoutUtils::GetWindowFor(aElement); if (!window) { return NS_OK;