Bug 849764 - Replace removeObserver() calls with three params with two in toolkit dir. r=mak

This commit is contained in:
Xin Zhang 2013-04-06 14:46:35 -04:00
parent 656b9ae336
commit 3507be82e0
4 changed files with 6 additions and 6 deletions

View File

@ -88,7 +88,7 @@ function test() {
Services.obs.addObserver(function (aSubject, aTopic, aData) {
if (aTopic == "passwordmgr-password-toggle-complete") {
Services.obs.removeObserver(arguments.callee, aTopic, false);
Services.obs.removeObserver(arguments.callee, aTopic);
func();
}
}, "passwordmgr-password-toggle-complete", false);

View File

@ -99,7 +99,7 @@ function test() {
Services.obs.addObserver(function (aSubject, aTopic, aData) {
if (aTopic == "passwordmgr-password-toggle-complete") {
Services.obs.removeObserver(arguments.callee, aTopic, false);
Services.obs.removeObserver(arguments.callee, aTopic);
func();
}
}, "passwordmgr-password-toggle-complete", false);

View File

@ -31,7 +31,7 @@ this.MozSocialAPI = {
}
} else {
Services.obs.removeObserver(injectController, "document-element-inserted", false);
Services.obs.removeObserver(injectController, "document-element-inserted");
}
}
};

View File

@ -36,7 +36,7 @@ let tests = {
profileURL: "http://en.wikipedia.org/wiki/Kuma_Lisa"
}
function ob(aSubject, aTopic, aData) {
Services.obs.removeObserver(ob, "social:profile-changed", false);
Services.obs.removeObserver(ob, "social:profile-changed");
is(aData, provider.origin, "update of profile from our provider");
let profile = provider.profile;
is(profile.portrait, expect.portrait, "portrait is set");
@ -56,7 +56,7 @@ let tests = {
name: "test-ambient"
}
function ob(aSubject, aTopic, aData) {
Services.obs.removeObserver(ob, "social:ambient-notification-changed", false);
Services.obs.removeObserver(ob, "social:ambient-notification-changed");
is(aData, provider.origin, "update is from our provider");
let notif = provider.ambientNotificationIcons[expect.name];
is(notif.name, expect.name, "ambientNotification reflected");
@ -74,7 +74,7 @@ let tests = {
userName: ""
};
function ob(aSubject, aTopic, aData) {
Services.obs.removeObserver(ob, "social:profile-changed", false);
Services.obs.removeObserver(ob, "social:profile-changed");
is(aData, provider.origin, "update of profile from our provider");
is(Object.keys(provider.profile).length, 0, "profile was cleared by empty username");
is(Object.keys(provider.ambientNotificationIcons).length, 0, "icons were cleared by empty username");