Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/toolkit/modules/Sqlite.jsm b/toolkit/modules/Sqlite.jsm
- index 986198e6b4fd..a9b1bed32499 100644
- --- a/toolkit/modules/Sqlite.jsm
- +++ b/toolkit/modules/Sqlite.jsm
- @@ -5,7 +5,7 @@
- "use strict";
- var EXPORTED_SYMBOLS = [
- - "Sqlite",
- + "Sqlite",
- ];
- // The maximum time to wait before considering a transaction stuck and rejecting
- @@ -13,21 +13,25 @@ var EXPORTED_SYMBOLS = [
- // the `_getTimeoutPromise` method on `ConnectionData` for details).
- const TRANSACTIONS_QUEUE_TIMEOUT_MS = 300000; // 5 minutes
- -const {XPCOMUtils} = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
- -const {setTimeout} = ChromeUtils.import("resource://gre/modules/Timer.jsm");
- +const {
- + XPCOMUtils
- +} = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
- +const {
- + setTimeout
- +} = ChromeUtils.import("resource://gre/modules/Timer.jsm");
- XPCOMUtils.defineLazyModuleGetters(this, {
- - AsyncShutdown: "resource://gre/modules/AsyncShutdown.jsm",
- - Services: "resource://gre/modules/Services.jsm",
- - OS: "resource://gre/modules/osfile.jsm",
- - Log: "resource://gre/modules/Log.jsm",
- - FileUtils: "resource://gre/modules/FileUtils.jsm",
- - PromiseUtils: "resource://gre/modules/PromiseUtils.jsm",
- + AsyncShutdown: "resource://gre/modules/AsyncShutdown.jsm",
- + Services: "resource://gre/modules/Services.jsm",
- + OS: "resource://gre/modules/osfile.jsm",
- + Log: "resource://gre/modules/Log.jsm",
- + FileUtils: "resource://gre/modules/FileUtils.jsm",
- + PromiseUtils: "resource://gre/modules/PromiseUtils.jsm",
- });
- XPCOMUtils.defineLazyServiceGetter(this, "FinalizationWitnessService",
- - "@mozilla.org/toolkit/finalizationwitness;1",
- - "nsIFinalizationWitnessService");
- + "@mozilla.org/toolkit/finalizationwitness;1",
- + "nsIFinalizationWitnessService");
- // Regular expression used by isInvalidBoundLikeQuery
- var likeSqlRegex = /\bLIKE\b\s(?![@:?])/i;
- @@ -48,10 +52,10 @@ var wrappedConnections = new Set();
- var isClosed = false;
- var Debugging = {
- - // Tests should fail if a connection auto closes. The exception is
- - // when finalization itself is tested, in which case this flag
- - // should be set to false.
- - failTestsOnAutoClose: true,
- + // Tests should fail if a connection auto closes. The exception is
- + // when finalization itself is tested, in which case this flag
- + // should be set to false.
- + failTestsOnAutoClose: true,
- };
- /**
- @@ -60,26 +64,26 @@ var Debugging = {
- * @param sql
- * (string) The SQL query to be verified.
- * @return boolean value telling us whether query was correct or not
- -*/
- + */
- function isInvalidBoundLikeQuery(sql) {
- - return likeSqlRegex.test(sql);
- + return likeSqlRegex.test(sql);
- }
- // Displays a script error message
- function logScriptError(message) {
- - let consoleMessage = Cc["@mozilla.org/scripterror;1"].
- - createInstance(Ci.nsIScriptError);
- - let stack = new Error();
- - consoleMessage.init(message, stack.fileName, null, stack.lineNumber, 0,
- - Ci.nsIScriptError.errorFlag, "component javascript");
- - Services.console.logMessage(consoleMessage);
- -
- - // This `Promise.reject` will cause tests to fail. The debugging
- - // flag can be used to suppress this for tests that explicitly
- - // test auto closes.
- - if (Debugging.failTestsOnAutoClose) {
- - Promise.reject(new Error(message));
- - }
- + let consoleMessage = Cc["@mozilla.org/scripterror;1"].
- + createInstance(Ci.nsIScriptError);
- + let stack = new Error();
- + consoleMessage.init(message, stack.fileName, null, stack.lineNumber, 0,
- + Ci.nsIScriptError.errorFlag, "component javascript");
- + Services.console.logMessage(consoleMessage);
- +
- + // This `Promise.reject` will cause tests to fail. The debugging
- + // flag can be used to suppress this for tests that explicitly
- + // test auto closes.
- + if (Debugging.failTestsOnAutoClose) {
- + Promise.re
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement