Bug 1407719: Fix failing xpcshell-test when building IB
This commit is contained in:
Родитель
c9f202f092
Коммит
b157af2dbc
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче