Bug 577323 - Use services.jsm instead of getService()

This commit is contained in:
Raymond Lee 2010-07-30 19:19:52 +08:00
parent af5ffd7ce6
commit cedee7ad88
3 changed files with 2 additions and 6 deletions

View File

@ -61,9 +61,6 @@ Storage = {
if (alreadyReady) {
callback();
} else {
var obsService =
Components.classes["@mozilla.org/observer-service;1"]
.getService(Components.interfaces.nsIObserverService);
var observer = {
observe: function(subject, topic, data) {
try {
@ -77,8 +74,7 @@ Storage = {
}
}
};
obsService.addObserver(
Services.obs.addObserver(
observer, "browser-delayed-startup-finished", false);
}
} catch(e) {

View File

@ -4,6 +4,7 @@
Components.utils.import("resource://gre/modules/tabview/tabs.js");
Components.utils.import("resource://gre/modules/tabview/utils.js");
Components.utils.import("resource://gre/modules/Services.jsm");
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
XPCOMUtils.defineLazyGetter(this, "gWindow", function() {

View File

@ -235,7 +235,6 @@ var UIManager = {
});
// ___ setup observer to save canvas images
Components.utils.import("resource://gre/modules/Services.jsm");
var observer = {
observe : function(subject, topic, data) {
if (topic == "quit-application-requested") {