Bug 959366 - Remove unused LazyNotificationGetter.shutdown function. r=mleibovic

This commit is contained in:
Errietta Kostala 2014-01-31 13:59:23 -05:00
Родитель 7a1e060cc8
Коммит bc9d7262b8
1 изменённых файлов: 6 добавлений и 25 удалений

Просмотреть файл

@ -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);
});
});