зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1482795 - Fix the gfx memory pressure observer. r=sotaro
This commit is contained in:
Родитель
473d7d25c5
Коммит
43aaf84a4c
|
@ -56,7 +56,7 @@ MemoryPressureObserver::Observe(nsISupports* aSubject,
|
|||
const char* aTopic,
|
||||
const char16_t* aData)
|
||||
{
|
||||
if (mListener && strcmp(aTopic, "memory-pressure")) {
|
||||
if (mListener && strcmp(aTopic, "memory-pressure") == 0) {
|
||||
MemoryPressureReason reason = MemoryPressureReason::LOW_MEMORY;
|
||||
auto reason_string = nsDependentString(aData);
|
||||
if (StringBeginsWith(reason_string, NS_LITERAL_STRING("low-memory-ongoing"))) {
|
||||
|
|
|
@ -1137,7 +1137,7 @@ void
|
|||
PuppetWidget::OnMemoryPressure(layers::MemoryPressureReason aWhy)
|
||||
{
|
||||
if (aWhy != MemoryPressureReason::LOW_MEMORY_ONGOING &&
|
||||
mVisible &&
|
||||
!mVisible &&
|
||||
mLayerManager &&
|
||||
XRE_IsContentProcess()) {
|
||||
mLayerManager->ClearCachedResources();
|
||||
|
|
Загрузка…
Ссылка в новой задаче