зеркало из https://github.com/mozilla/pjs.git
Bug 696179: properly cache null results for "alias" from the engineMetadataService so that we avoid hitting SQLite multiple times when entering text in the location bar, r=rflint
--HG-- extra : transplant_source : %17%3D%E7%D0%98%3B%D8Iv%F3UD%03%04%C2%E7%C0%3E%93%12
This commit is contained in:
Родитель
8ec81f02e1
Коммит
5b0b22c0a7
|
@ -1005,8 +1005,9 @@ function Engine(aLocation, aSourceDataType, aIsReadOnly) {
|
|||
}
|
||||
|
||||
Engine.prototype = {
|
||||
// The engine's alias.
|
||||
_alias: null,
|
||||
// The engine's alias (can be null). Initialized to |undefined| to indicate
|
||||
// not-initialized-from-engineMetadataService.
|
||||
_alias: undefined,
|
||||
// The data describing the engine. Is either an array of bytes, for Sherlock
|
||||
// files, or an XML document element, for XML plugins.
|
||||
_data: null,
|
||||
|
@ -2201,7 +2202,7 @@ Engine.prototype = {
|
|||
|
||||
// nsISearchEngine
|
||||
get alias() {
|
||||
if (this._alias === null)
|
||||
if (this._alias === undefined)
|
||||
this._alias = engineMetadataService.getAttr(this, "alias");
|
||||
|
||||
return this._alias;
|
||||
|
|
Загрузка…
Ссылка в новой задаче