Bug 1407719: Fix failing xpcshell-test when building IB

This commit is contained in:
Arlolra 2017-10-17 14:48:00 -04:00
Родитель c9f202f092
Коммит b157af2dbc
4 изменённых файлов: 32 добавлений и 26 удалений

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

@ -96,27 +96,29 @@ function getDBConnection()
// commited automatically at the end of the event loop spin so that
// we flush buddy list data to disk only once per event loop spin.
var gDBConnWithPendingTransaction = null;
this.__defineGetter__("DBConn", function() {
if (gDBConnWithPendingTransaction)
return gDBConnWithPendingTransaction;
Object.defineProperty(this, "DBConn", {
get: function() {
if (gDBConnWithPendingTransaction)
return gDBConnWithPendingTransaction;
if (!gDBConnection) {
gDBConnection = getDBConnection();
Services.obs.addObserver(function dbClose(aSubject, aTopic, aData) {
Services.obs.removeObserver(dbClose, aTopic);
if (gDBConnection) {
gDBConnection.asyncClose();
gDBConnection = null;
}
}, "profile-before-change", false);
if (!gDBConnection) {
gDBConnection = getDBConnection();
Services.obs.addObserver(function dbClose(aSubject, aTopic, aData) {
Services.obs.removeObserver(dbClose, aTopic);
if (gDBConnection) {
gDBConnection.asyncClose();
gDBConnection = null;
}
}, "profile-before-change", false);
}
gDBConnWithPendingTransaction = gDBConnection;
gDBConnection.beginTransaction();
executeSoon(function() {
gDBConnWithPendingTransaction.commitTransaction();
gDBConnWithPendingTransaction = null;
});
return gDBConnection;
}
gDBConnWithPendingTransaction = gDBConnection;
gDBConnection.beginTransaction();
executeSoon(function() {
gDBConnWithPendingTransaction.commitTransaction();
gDBConnWithPendingTransaction = null;
});
return gDBConnection;
});
function TagsService() { }

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

@ -15,10 +15,12 @@ this.EXPORTED_SYMBOLS = [
var kEmoticonsThemePref = "messenger.options.emoticonsTheme";
var kThemeFile = "theme.js";
this.__defineGetter__("gTheme", function() {
delete this.gTheme;
gPrefObserver.init();
return this.gTheme = getTheme();
Object.defineProperty(this, "gTheme", {
get: function() {
delete this.gTheme;
gPrefObserver.init();
return this.gTheme = getTheme();
}
});
var gPrefObserver = {

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

@ -219,8 +219,8 @@ function test_permissiveMode() {
}
// The shorthand 'font' is decomposed to non-shorthand properties,
// and not recomposed as some non-shorthand properties are filtered out.
do_check_eq("<span style=\"font-family: normal; font-style: normal;" +
" font-weight: normal; font-size: 15px;\">foo</span>",
do_check_eq("<span style=\"font-style: normal; font-weight: normal;" +
" font-size: 15px; font-family: normal;\">foo</span>",
cleanupImMarkup("<span style=\"font: 15px normal\">foo</span>"));
// But still filter out dangerous CSS rules.

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

@ -21,7 +21,9 @@ XPCOMUtils.defineLazyGetter(this, "_", () =>
XPCOMUtils.defineLazyGetter(this, "_defaultResource", () =>
l10nHelper("chrome://branding/locale/brand.properties")("brandShortName")
);
this.__defineGetter__("XMPPDefaultResource", () => _defaultResource);
Object.defineProperty(this, "XMPPDefaultResource", {
get: () => _defaultResource
});
function XMPPSession(aHost, aPort, aSecurity, aJID, aPassword, aAccount) {
this._host = aHost;