зеркало из https://github.com/mozilla/gecko-dev.git
Bug 624652 - Remove the explict quit from the Memory Observer. Discussed with blassey and mfinkle r=mfinkle
This commit is contained in:
Родитель
612a3bad11
Коммит
98c6e7216f
|
@ -2279,21 +2279,12 @@ var ContentCrashObserver = {
|
|||
};
|
||||
|
||||
var MemoryObserver = {
|
||||
_lastOOM: 0,
|
||||
|
||||
observe: function mo_observe(aSubject, aTopic, aData) {
|
||||
if (aData == "heap-minimize") {
|
||||
// do non-destructive stuff here.
|
||||
return;
|
||||
}
|
||||
|
||||
if (this._lastOOM != 0 &&
|
||||
Date.now() - this._lastOOM < 10000) {
|
||||
let appStartup = Cc["@mozilla.org/toolkit/app-startup;1"].getService(Ci.nsIAppStartup);
|
||||
appStartup.quit(Ci.nsIAppStartup.eForceQuit);
|
||||
return;
|
||||
}
|
||||
|
||||
for (let i = Browser.tabs.length - 1; i >= 0; i--) {
|
||||
let tab = Browser.tabs[i];
|
||||
if (tab == Browser.selectedTab)
|
||||
|
@ -2304,7 +2295,6 @@ var MemoryObserver = {
|
|||
window.QueryInterface(Ci.nsIInterfaceRequestor)
|
||||
.getInterface(Ci.nsIDOMWindowUtils).garbageCollect();
|
||||
Cu.forceGC();
|
||||
this._lastOOM = Date.now();
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче