Commit Graph
16 Commits
Author SHA1 Message Date
Jan Henning 71586b6994 Bug 1333046 - Part 2 - Move zombification function into the tab object. r=ahunt
A tab object should know how to zombify itself instead of having to rely on the MemoryObserver. This also simplifies the situation for anybody else who wants to call this function since it is no longer necessary to figure out how to load the MemoryObserver for this.

MozReview-Commit-ID: 5IX114QUjBT
2017-01-19 21:45:03 +01:00
Jan Henning e0e5ed10dd Bug 1268981 - Make sure the bfcache is enabled during the mobile session store form data test. r=margaret
Without the bfcache, the inner value will not be restored after a page navigation, therefore we need to make sure that the bfcache isn't disabled by a stray memory pressure event before or during the test.

MozReview-Commit-ID: 3k1EgGDEPb
2016-04-30 16:46:57 +02:00
Jan Henning 9741ef4a43 Bug 1268177 - Disable background tab zombifications during tests. r=margaret
During tests that open additional tabs, the main test tab controlling the test is at risk of being zombified if a memory pressure event arrives, which breaks the test and leads to the test timing out. Therefore, we now disable background tab zombifications during tests.

This means that there's a slightly increased risk of being OOM killed instead, however
- the tabs opened by the tests themselves are normally relatively short-lived anyway
- we're no worse off than if the tab containing the test harness code had been zombified.

MozReview-Commit-ID: 1Ntvn4yjWlZ
2016-04-29 21:19:43 +02:00
Jan Henning 1a1cc6c3c7 Bug 1044556 - Part 4 - Unify audio playback indication handling. r=sebastian
Since we're now triggering zombification events, we can easily handle resetting the audio playback indicator upon zombifciation by having the tab object listen for the appropriate TabPreZombify event and handle it alongside the normal DOMAudioPlayback events instead of duplicating that functionality within the memory observer.

MozReview-Commit-ID: JSgGyw9g6Lm
2016-03-30 20:41:37 +02:00
Jan Henning a72eb27686 Bug 1044556 - Part 1 - Notify the session store about tab zombifications. r=sebastian
The session store relies on a few event listeners to track the history and life cycle of a tab. Under memory pressure, background tabs are zombified in order to reduce our memory usage. This involves destroying the original tab object and then recreating it as a delay loaded tab.

As the session store is never told about this, it will keep the event listeners for the old tab objects - which have now been destroyed - alive and won't receive any future events for the new tab objects. This means that once a zombification has been triggered, the session history for those tabs will become effectively frozen, so after the next zombification or a session restore, the tab will reload the wrong page.

Therefore this patch introduces two new events which are sent during the tab zombification process and allow the session store to detach its event listeners from the old tab object before it is going to be destroyed and subsequently reattach its listeners to the new tab object.

MozReview-Commit-ID: 6xZtsCNZbQY
2016-03-18 11:40:26 +01:00
Jan Henning e018c0b79d Bug 1260113 - Part 2 - Don't zombify tabs playing audio even under memory pressure. r=margaret
Bug 1253278 added support for not zombifying least recently used tabs if they were playing audio. This patch extends this behaviour to also cover the case where we want to zombify *all* background tabs under memory-pressure. Therefore, a tab which is currently playing audio should now never get zombified, which also means that the issue about the audio playing indicator fixed in part 1 is now sidestepped.

MozReview-Commit-ID: LBeEX2KPh2J
2016-03-27 17:15:41 +01:00
Jan Henning 7f6e4bb842 Bug 1260113 - Part 1 - Inform the Java UI to stop displaying the audio playback icon for zombified tabs. r=margaret
When a tab is zombified, its original tab object is destroyed and replaced by a new copy set for delay loading. This stops audio playback, but doesn't invoke the normal DOMAudioPlaybackStopped event. Because of this, we continue displaying the audio playback indicator in the tabs tray after a zombification, even though the audio itself has stopped.

With this patch, the zombification routine now notifies the UI to stop showing the audio playback indicator if neccessary.

MozReview-Commit-ID: 7oh4d6XP61K
2016-03-28 15:50:28 +01:00
Mark Finkle e2ff7ebd82 Bug 825483 - Reduce bfcache size on low memory devices r=wesj 2015-02-12 09:02:31 -05:00
Bill McCloskey daff0feda8 Bug 1069059 - [e10s] Convert isWindowPrivate calls to isBrowserPrivate/isContentWindowPrivate as appropriate (r=mconley,margaret) 2014-09-23 15:48:52 -07:00
Kartikaya Gupta 8defb272f3 Bug 1057709 - Remove unused telemetry histograms. r=mfinkle 2014-08-24 01:24:39 -04:00
Nicholas Nethercote 7b107d5931 Bug 1010064 - Allow memory reports to be anonymized. r=bsmedberg. 2014-05-20 23:06:54 -07:00
Mark Finkle 468fd786c1 Bug 792139 - Discard decoded images as soon as possible on low-memory devices r=kats 2014-04-29 08:10:16 -04:00
Jed Davis 867bd0590a Bug 946407 - Reimplement DumpMemoryInfoToTempDir in terms of GetReports. r=njn
This winds up exposing things in the nsIMemoryReporterManager interface
that arguably don't belong at that level of abstraction -- "minimize
memory usage first" and DMD -- in order to take advantage of the
infrastructure that GetReports already has for managing the child
processes.
2014-03-04 18:27:13 -08:00
Mark Finkle d68790b9c9 Bug 886496 - When doing lazy tab restoration, set the <browser>s in question to display:none until restored r=bnicholson 2013-07-12 08:44:23 -04:00
Nicholas Nethercote 53a6da0fed Bug 848560 (part 4) - Fix broken memory reporting on Fennec. r=kats. 2013-04-10 11:43:31 +10:00
Mark Finkle 309f7de8ef Bug 854107 - Lazy load notification-based JS objects in browser.js r=wesj 2013-03-25 17:05:04 -04:00