mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-07 18:04:46 +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
|
||||
return true;
|
||||
#else
|
||||
if (!gfxPrefs::SingletonExists()) {
|
||||
// Make sure the gfxPrefs has been initialized before reading from it.
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
gfxPrefs::GetSingleton();
|
||||
}
|
||||
return gfxPrefs::AsyncPanZoomEnabledDoNotUseDirectly();
|
||||
#endif
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user