mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 02:14:43 +00:00
Bug 1356695 - Ensure gfxPrefs is initialized if gfxPlatform::AsyncPanZoomEnabled is called early in startup. r=milan
MozReview-Commit-ID: CnHHcuZRPTc
This commit is contained in:
parent
4444fcf4d5
commit
7a4b7a370e
@ -2590,6 +2590,11 @@ gfxPlatform::AsyncPanZoomEnabled()
|
|||||||
#ifdef MOZ_WIDGET_ANDROID
|
#ifdef MOZ_WIDGET_ANDROID
|
||||||
return true;
|
return true;
|
||||||
#else
|
#else
|
||||||
|
if (!gfxPrefs::SingletonExists()) {
|
||||||
|
// Make sure the gfxPrefs has been initialized before reading from it.
|
||||||
|
MOZ_ASSERT(NS_IsMainThread());
|
||||||
|
gfxPrefs::GetSingleton();
|
||||||
|
}
|
||||||
return gfxPrefs::AsyncPanZoomEnabledDoNotUseDirectly();
|
return gfxPrefs::AsyncPanZoomEnabledDoNotUseDirectly();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user