зеркало из https://github.com/mozilla/pjs.git
Fix bogus assumptions in inspector that can lead to crashes. Bug
270771. r=timeless, sr=jst
This commit is contained in:
Родитель
7466eb5da0
Коммит
178d9de3dd
|
@ -99,7 +99,11 @@ inDOMUtils::IsIgnorableWhitespace(nsIDOMCharacterData *aDataNode,
|
|||
}
|
||||
|
||||
nsCOMPtr<nsIPresShell> presShell = inLayoutUtils::GetPresShellFor(win);
|
||||
NS_ASSERTION(presShell, "No pres shell!");
|
||||
if (!presShell) {
|
||||
// Display:none iframe or something... Bail out
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
nsIFrame* frame;
|
||||
nsCOMPtr<nsIContent> content = do_QueryInterface(aDataNode);
|
||||
|
|
|
@ -166,6 +166,7 @@ inFlasher::DrawElementOutline(nsIDOMElement* aElement)
|
|||
nsCOMPtr<nsIDOMWindowInternal> window = inLayoutUtils::GetWindowFor(aElement);
|
||||
if (!window) return NS_OK;
|
||||
nsCOMPtr<nsIPresShell> presShell = inLayoutUtils::GetPresShellFor(window);
|
||||
if (!presShell) return NS_OK;
|
||||
|
||||
nsPresContext *presContext = presShell->GetPresContext();
|
||||
|
||||
|
@ -210,7 +211,9 @@ inFlasher::ScrollElementIntoView(nsIDOMElement *aElement)
|
|||
}
|
||||
|
||||
nsCOMPtr<nsIPresShell> presShell = inLayoutUtils::GetPresShellFor(window);
|
||||
NS_ASSERTION(presShell, "Dude, where's my pres shell?!");
|
||||
if (!presShell) {
|
||||
return NS_OK;
|
||||
}
|
||||
nsIFrame* frame = inLayoutUtils::GetFrameFor(aElement, presShell);
|
||||
if (!frame) {
|
||||
return NS_OK;
|
||||
|
|
Загрузка…
Ссылка в новой задаче