зеркало из https://github.com/mozilla/pjs.git
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:
Родитель
c383b059bb
Коммит
ff3e2f93ba
|
@ -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;
|
||||
},
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче