зеркало из https://github.com/mozilla/gecko-dev.git
Bug 930970 - Fix bustage caused by tests assuming this._rdf is created within migrateUI, rs=bustage
This commit is contained in:
Родитель
75e9c30547
Коммит
3d14bfbc07
|
@ -120,11 +120,6 @@ function BrowserGlue() {
|
|||
return sanitizerScope.Sanitizer;
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyServiceGetter(this, "_rdf", "@mozilla.org/rdf/rdf-service;1",
|
||||
"nsIRDFService");
|
||||
XPCOMUtils.defineLazyGetter(this, "_dataSource",
|
||||
function() this._rdf.GetDataSource("rdf:local-store"));
|
||||
|
||||
this._init();
|
||||
}
|
||||
|
||||
|
@ -1293,8 +1288,19 @@ BrowserGlue.prototype = {
|
|||
const UI_VERSION = 14;
|
||||
const BROWSER_DOCURL = "chrome://browser/content/browser.xul#";
|
||||
|
||||
let wasCustomizedAndOnAustralis = Services.prefs.prefHasUserValue("browser.uiCustomization.state");
|
||||
let currentUIVersion = 0;
|
||||
try {
|
||||
currentUIVersion = Services.prefs.getIntPref("browser.migration.version");
|
||||
} catch(ex) {}
|
||||
if (!wasCustomizedAndOnAustralis && currentUIVersion >= UI_VERSION)
|
||||
return;
|
||||
|
||||
this._rdf = Cc["@mozilla.org/rdf/rdf-service;1"].getService(Ci.nsIRDFService);
|
||||
this._dataSource = this._rdf.GetDataSource("rdf:local-store");
|
||||
|
||||
// No version check for this as this code should run until we have Australis everywhere:
|
||||
if (Services.prefs.prefHasUserValue("browser.uiCustomization.state")) {
|
||||
if (wasCustomizedAndOnAustralis) {
|
||||
// This profile's been on australis! If it's missing the back/fwd button
|
||||
// or go/stop/reload button, then put them back:
|
||||
let currentsetResource = this._rdf.GetResource("currentset");
|
||||
|
@ -1312,17 +1318,15 @@ BrowserGlue.prototype = {
|
|||
}
|
||||
this._setPersist(toolbarResource, currentsetResource, currentset);
|
||||
Services.prefs.clearUserPref("browser.uiCustomization.state");
|
||||
|
||||
// If we don't have anything else to do, we can bail here:
|
||||
if (currentUIVersion >= UI_VERSION) {
|
||||
delete this._rdf;
|
||||
delete this._dataSource;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
let currentUIVersion = 0;
|
||||
try {
|
||||
currentUIVersion = Services.prefs.getIntPref("browser.migration.version");
|
||||
} catch(ex) {}
|
||||
if (currentUIVersion >= UI_VERSION) {
|
||||
delete this._rdf;
|
||||
delete this._dataSource;
|
||||
return;
|
||||
}
|
||||
|
||||
this._dirty = false;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче