mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-13 05:15:45 +00:00
Bug 1451467 Check for nullptr mDocument->GetWindow() in a few more places in nsPresContext. r=smaug
--HG-- extra : rebase_source : a6ac4af614b261ec44162011daddfff0c8536f0c
This commit is contained in:
parent
a9fd0592af
commit
e8a484cfaa
@ -1787,8 +1787,10 @@ nsPresContext::ThemeChangedInternal()
|
||||
|
||||
// Recursively notify all remote leaf descendants that the
|
||||
// system theme has changed.
|
||||
nsContentUtils::CallOnAllRemoteChildren(mDocument->GetWindow(),
|
||||
NotifyThemeChanged, nullptr);
|
||||
if (nsPIDOMWindowOuter* window = mDocument->GetWindow()) {
|
||||
nsContentUtils::CallOnAllRemoteChildren(window,
|
||||
NotifyThemeChanged, nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
@ -2118,9 +2120,11 @@ NotifyTabSizeModeChanged(TabParent* aTab, void* aArg)
|
||||
void
|
||||
nsPresContext::SizeModeChanged(nsSizeMode aSizeMode)
|
||||
{
|
||||
nsContentUtils::CallOnAllRemoteChildren(mDocument->GetWindow(),
|
||||
NotifyTabSizeModeChanged,
|
||||
&aSizeMode);
|
||||
if (nsPIDOMWindowOuter* window = mDocument->GetWindow()) {
|
||||
nsContentUtils::CallOnAllRemoteChildren(window,
|
||||
NotifyTabSizeModeChanged,
|
||||
&aSizeMode);
|
||||
}
|
||||
MediaFeatureValuesChangedAllDocuments({ MediaFeatureChangeReason::SizeModeChange });
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user