зеркало из 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
|
#ifdef MOZ_WEBRTC
|
||||||
["WebrtcUI", ["getUserMedia:request", "recording-device-events"], "chrome://browser/content/WebrtcUI.js"],
|
["WebrtcUI", ["getUserMedia:request", "recording-device-events"], "chrome://browser/content/WebrtcUI.js"],
|
||||||
|
@ -125,14 +114,9 @@ var LazyNotificationGetter = {
|
||||||
return sandbox[name];
|
return sandbox[name];
|
||||||
});
|
});
|
||||||
notifications.forEach(function (aNotification) {
|
notifications.forEach(function (aNotification) {
|
||||||
let o = {
|
Services.obs.addObserver(function(s, t, d) {
|
||||||
notification: aNotification,
|
window[name].observe(s, t, d)
|
||||||
observe: function(s, t, d) {
|
}, aNotification, false);
|
||||||
window[name].observe(s, t, d);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
Services.obs.addObserver(o, aNotification, false);
|
|
||||||
LazyNotificationGetter.observers.push(o);
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -143,12 +127,9 @@ var LazyNotificationGetter = {
|
||||||
let [name, notifications, resource] = module;
|
let [name, notifications, resource] = module;
|
||||||
XPCOMUtils.defineLazyModuleGetter(this, name, resource);
|
XPCOMUtils.defineLazyModuleGetter(this, name, resource);
|
||||||
notifications.forEach(notification => {
|
notifications.forEach(notification => {
|
||||||
let o = {
|
Services.obs.addObserver((s,t,d) => {
|
||||||
notification: notification,
|
this[name].observe(s,t,d)
|
||||||
observe: (s, t, d) => this[name].observe(s, t, d)
|
}, notification, false);
|
||||||
};
|
|
||||||
Services.obs.addObserver(o, notification, false);
|
|
||||||
LazyNotificationGetter.observers.push(o);
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче