зеркало из https://github.com/mozilla/gecko-dev.git
Bug 959366 - Remove unused LazyNotificationGetter.shutdown function. r=mleibovic
This commit is contained in:
Родитель
7a1e060cc8
Коммит
bc9d7262b8
|
@ -95,17 +95,6 @@ XPCOMUtils.defineLazyModuleGetter(this, "WebappManager",
|
|||
});
|
||||
});
|
||||
|
||||
// Lazily-loaded browser scripts that use observer notifcations:
|
||||
var LazyNotificationGetter = {
|
||||
observers: [],
|
||||
shutdown: function lng_shutdown() {
|
||||
this.observers.forEach(function(o) {
|
||||
Services.obs.removeObserver(o, o.notification);
|
||||
});
|
||||
this.observers = [];
|
||||
}
|
||||
};
|
||||
|
||||
[
|
||||
#ifdef MOZ_WEBRTC
|
||||
["WebrtcUI", ["getUserMedia:request", "recording-device-events"], "chrome://browser/content/WebrtcUI.js"],
|
||||
|
@ -125,14 +114,9 @@ var LazyNotificationGetter = {
|
|||
return sandbox[name];
|
||||
});
|
||||
notifications.forEach(function (aNotification) {
|
||||
let o = {
|
||||
notification: aNotification,
|
||||
observe: function(s, t, d) {
|
||||
window[name].observe(s, t, d);
|
||||
}
|
||||
};
|
||||
Services.obs.addObserver(o, aNotification, false);
|
||||
LazyNotificationGetter.observers.push(o);
|
||||
Services.obs.addObserver(function(s, t, d) {
|
||||
window[name].observe(s, t, d)
|
||||
}, aNotification, false);
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -143,12 +127,9 @@ var LazyNotificationGetter = {
|
|||
let [name, notifications, resource] = module;
|
||||
XPCOMUtils.defineLazyModuleGetter(this, name, resource);
|
||||
notifications.forEach(notification => {
|
||||
let o = {
|
||||
notification: notification,
|
||||
observe: (s, t, d) => this[name].observe(s, t, d)
|
||||
};
|
||||
Services.obs.addObserver(o, notification, false);
|
||||
LazyNotificationGetter.observers.push(o);
|
||||
Services.obs.addObserver((s,t,d) => {
|
||||
this[name].observe(s,t,d)
|
||||
}, notification, false);
|
||||
});
|
||||
});
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче