Bug 462077 - Lazily create Extensions object (FUEL)

This lazily creates the Extensions object off of Application so we do not take
the hit of initializing the object during startup if we do not need it.
r=gavin
This commit is contained in:
Shawn Wilsher 2008-10-29 16:56:46 -04:00
Родитель c383b059bb
Коммит ff3e2f93ba
1 изменённых файлов: 3 добавлений и 1 удалений

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

@ -616,7 +616,6 @@ extApplication.prototype = {
// for nsIObserver
observe: function app_observe(aSubject, aTopic, aData) {
if (aTopic == "app-startup") {
this._extensions = new Extensions();
this.events.dispatch("load", "application");
}
else if (aTopic == "final-ui-startup") {
@ -675,6 +674,9 @@ extApplication.prototype = {
},
get extensions() {
if (this._extensions == null)
this._extensions = new Extensions();
return this._extensions;
},