mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-17 07:15:46 +00:00
Bug 898871 - Hold a strong ref on the pres shell while scrolling, check for damage afterwards. r=roc
This commit is contained in:
parent
6cfd0db25c
commit
501b3308d9
@ -344,6 +344,11 @@ ImageDocument::ShrinkToFit()
|
||||
// origin now that we're showing a shrunk-to-window version.
|
||||
ScrollImageTo(0, 0, false);
|
||||
|
||||
if (!mImageContent) {
|
||||
// ScrollImageTo flush destroyed our content.
|
||||
return;
|
||||
}
|
||||
|
||||
SetModeClass(eShrinkToFit);
|
||||
|
||||
mImageIsResized = true;
|
||||
@ -375,7 +380,7 @@ ImageDocument::ScrollImageTo(int32_t aX, int32_t aY, bool restoreImage)
|
||||
FlushPendingNotifications(Flush_Layout);
|
||||
}
|
||||
|
||||
nsIPresShell *shell = GetShell();
|
||||
nsCOMPtr<nsIPresShell> shell = GetShell();
|
||||
if (!shell)
|
||||
return;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user