Bug 1204812 - Keep Console.jsm in toolkit/modules/ r=jryans,Mossop

This commit is contained in:
Alexandre Poirot 2015-10-15 03:45:22 -07:00
parent 8f5c8e2002
commit dea025001d
69 changed files with 77 additions and 73 deletions

View File

@ -12,7 +12,7 @@ const { Cc, Ci, Cu, Cr } = require("chrome");
const self = require("../self");
const prefs = require("../preferences/service");
const { merge } = require("../util/object");
const { ConsoleAPI } = Cu.import("resource://gre/modules/devtools/shared/Console.jsm", {});
const { ConsoleAPI } = Cu.import("resource://gre/modules/Console.jsm", {});
const DEFAULT_LOG_LEVEL = "error";
const ADDON_LOG_LEVEL_PREF = "extensions." + self.id + ".sdk.console.logLevel";

View File

@ -798,7 +798,7 @@ function Loader(options) {
globals: {
get console() {
// Import Console.jsm from here to prevent loading it until someone uses it
let { ConsoleAPI } = Cu.import("resource://gre/modules/devtools/shared/Console.jsm");
let { ConsoleAPI } = Cu.import("resource://gre/modules/Console.jsm");
let console = new ConsoleAPI({
consoleID: options.id ? "addon/" + options.id : ""
});

View File

@ -5,7 +5,7 @@
const { utils: Cu } = Components;
const { Services } = Cu.import("resource://gre/modules/Services.jsm", {});
const LoaderModule = Cu.import("resource://gre/modules/commonjs/toolkit/loader.js", {}).Loader;
const { console } = Cu.import("resource://gre/modules/devtools/shared/Console.jsm", {});
const { console } = Cu.import("resource://gre/modules/Console.jsm", {});
var {
Loader, main, Module, Require, unload
} = LoaderModule;

View File

@ -5,7 +5,7 @@
#endif
XPCOMUtils.defineLazyModuleGetter(this, "console",
"resource://gre/modules/devtools/shared/Console.jsm");
"resource://gre/modules/Console.jsm");
var gDebug = false;
try {

View File

@ -64,7 +64,7 @@ XPCOMUtils.defineLazyModuleGetter(this, "Task",
"resource://gre/modules/Task.jsm");
XPCOMUtils.defineLazyGetter(this, "DownloadsLogger", () => {
let { ConsoleAPI } = Cu.import("resource://gre/modules/devtools/shared/Console.jsm", {});
let { ConsoleAPI } = Cu.import("resource://gre/modules/Console.jsm", {});
let consoleOptions = {
maxLogLevelPref: "browser.download.loglevel",
prefix: "Downloads"

View File

@ -7,7 +7,7 @@ const {classes: Cc, interfaces: Ci, utils: Cu} = Components;
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "console",
"resource://gre/modules/devtools/shared/Console.jsm");
"resource://gre/modules/Console.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "LoopStorage",
"resource:///modules/loop/LoopStorage.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "Promise",

View File

@ -182,7 +182,7 @@ XPCOMUtils.defineLazyServiceGetter(this, "gWM",
// Create a new instance of the ConsoleAPI so we can control the maxLogLevel with a pref.
XPCOMUtils.defineLazyGetter(this, "log", () => {
let ConsoleAPI = Cu.import("resource://gre/modules/devtools/shared/Console.jsm", {}).ConsoleAPI;
let ConsoleAPI = Cu.import("resource://gre/modules/Console.jsm", {}).ConsoleAPI;
let consoleOptions = {
maxLogLevelPref: PREF_LOG_LEVEL,
prefix: "Loop"

View File

@ -38,7 +38,7 @@ Cu.import("resource://gre/modules/AsyncShutdown.jsm");
Cu.import("resource://gre/modules/Preferences.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "console",
"resource://gre/modules/devtools/shared/Console.jsm");
"resource://gre/modules/Console.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "RunState",
"resource:///modules/sessionstore/RunState.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "TelemetryStopwatch",

View File

@ -18,7 +18,7 @@ Cu.import("resource://gre/modules/TelemetryStopwatch.jsm", this);
XPCOMUtils.defineLazyModuleGetter(this, "AppConstants",
"resource://gre/modules/AppConstants.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "console",
"resource://gre/modules/devtools/shared/Console.jsm");
"resource://gre/modules/Console.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "PrivacyFilter",
"resource:///modules/sessionstore/PrivacyFilter.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "SessionStore",

View File

@ -13,7 +13,7 @@ Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "console",
"resource://gre/modules/devtools/shared/Console.jsm");
"resource://gre/modules/Console.jsm");
// Returns the principal for a given |frame| contained in a given |docShell|.
function getPrincipalForFrame(docShell, frame) {

View File

@ -131,7 +131,7 @@ XPCOMUtils.defineLazyServiceGetter(this, "gScreenManager",
XPCOMUtils.defineLazyServiceGetter(this, "Telemetry",
"@mozilla.org/base/telemetry;1", "nsITelemetry");
XPCOMUtils.defineLazyModuleGetter(this, "console",
"resource://gre/modules/devtools/shared/Console.jsm");
"resource://gre/modules/Console.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "RecentWindow",
"resource:///modules/RecentWindow.jsm");

View File

@ -13,7 +13,7 @@ Cu.import("resource://gre/modules/Promise.jsm", this);
Cu.import("resource://gre/modules/Task.jsm", this);
XPCOMUtils.defineLazyModuleGetter(this, "console",
"resource://gre/modules/devtools/shared/Console.jsm");
"resource://gre/modules/Console.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "PrivacyFilter",
"resource:///modules/sessionstore/PrivacyFilter.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "TabStateCache",

View File

@ -42,7 +42,7 @@ Cu.import("resource://gre/modules/PrivateBrowsingUtils.jsm");
Cu.import("resource://gre/modules/Promise.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "console",
"resource://gre/modules/devtools/shared/Console.jsm");
"resource://gre/modules/Console.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "SessionFile",
"resource:///modules/sessionstore/SessionFile.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "CrashMonitor",

View File

@ -73,7 +73,7 @@ const TARGET_SEARCHENGINE_PREFIX = "searchEngine-";
// Create a new instance of the ConsoleAPI so we can control the maxLogLevel with a pref.
XPCOMUtils.defineLazyGetter(this, "log", () => {
let ConsoleAPI = Cu.import("resource://gre/modules/devtools/shared/Console.jsm", {}).ConsoleAPI;
let ConsoleAPI = Cu.import("resource://gre/modules/Console.jsm", {}).ConsoleAPI;
let consoleOptions = {
maxLogLevelPref: PREF_LOG_LEVEL,
prefix: "UITour",

View File

@ -11,7 +11,7 @@ var { classes: Cc, interfaces: Ci, utils: Cu, results: Cr } = Components;
Cu.import("resource://gre/modules/Task.jsm");
var { loader, require } = Cu.import("resource://gre/modules/devtools/shared/Loader.jsm");
Cu.import("resource://gre/modules/devtools/shared/Console.jsm");
Cu.import("resource://gre/modules/Console.jsm");
Cu.import("resource:///modules/devtools/client/shared/widgets/ViewHelpers.jsm");
loader.lazyRequireGetter(this, "promise");

View File

@ -9,7 +9,7 @@ const {gDevTools} = Cu.import("resource:///modules/devtools/client/framework/gDe
const {require} = Cu.import("resource://gre/modules/devtools/shared/Loader.jsm", {});
const promise = require("promise");
const {TargetFactory} = require("devtools/client/framework/target");
const {console} = Cu.import("resource://gre/modules/devtools/shared/Console.jsm", {});
const {console} = Cu.import("resource://gre/modules/Console.jsm", {});
const {ViewHelpers} = Cu.import("resource:///modules/devtools/client/shared/widgets/ViewHelpers.jsm", {});
const DevToolsUtils = require("devtools/shared/DevToolsUtils");

View File

@ -9,7 +9,7 @@ Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
Cu.import("resource:///modules/devtools/client/shared/widgets/SideMenuWidget.jsm");
Cu.import("resource:///modules/devtools/client/shared/widgets/ViewHelpers.jsm");
Cu.import("resource://gre/modules/devtools/shared/Console.jsm");
Cu.import("resource://gre/modules/Console.jsm");
const { require } = Cu.import("resource://gre/modules/devtools/shared/Loader.jsm", {});
const promise = require("promise");

View File

@ -6,7 +6,7 @@ const TEST_BASE_HTTP = "http://example.com/browser/devtools/client/commandline/t
const TEST_BASE_HTTPS = "https://example.com/browser/devtools/client/commandline/test/";
var { require } = Cu.import("resource://gre/modules/devtools/shared/Loader.jsm", {});
var { console } = require("resource://gre/modules/devtools/shared/Console.jsm");
var { console } = require("resource://gre/modules/Console.jsm");
var DevToolsUtils = require("devtools/shared/DevToolsUtils");
// Import the GCLI test helper

View File

@ -43,7 +43,7 @@ devtoolsCommandlineHandler.prototype = {
// Load the browser devtools main module as the loader's main module.
Cu.import("resource:///modules/devtools/client/framework/gDevTools.jsm");
let hudservice = require("devtools/client/webconsole/hudservice");
let { console } = Cu.import("resource://gre/modules/devtools/shared/Console.jsm", {});
let { console } = Cu.import("resource://gre/modules/Console.jsm", {});
hudservice.toggleBrowserConsole().then(null, console.error);
} else {
window.focus(); // the Browser Console was already open

View File

@ -14,7 +14,7 @@ Cu.import("resource://gre/modules/XPCOMUtils.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "Task",
"resource://gre/modules/Task.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "console",
"resource://gre/modules/devtools/shared/Console.jsm");
"resource://gre/modules/Console.jsm");
function FontInspector(inspector, window)
{

View File

@ -17,7 +17,7 @@ loader.lazyRequireGetter(this, "TargetFactory", "devtools/client/framework/targe
loader.lazyRequireGetter(this, "Toolbox", "devtools/client/framework/toolbox", true);
XPCOMUtils.defineLazyModuleGetter(this, "console",
"resource://gre/modules/devtools/shared/Console.jsm");
"resource://gre/modules/Console.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "CustomizableUI",
"resource:///modules/CustomizableUI.jsm");
loader.lazyRequireGetter(this, "DebuggerServer", "devtools/server/main", true);

View File

@ -14,7 +14,7 @@ function scopedCuImport(path) {
const {Services} = scopedCuImport("resource://gre/modules/Services.jsm");
const {gDevTools} = scopedCuImport("resource:///modules/devtools/client/framework/gDevTools.jsm");
const {console} = scopedCuImport("resource://gre/modules/devtools/shared/Console.jsm");
const {console} = scopedCuImport("resource://gre/modules/Console.jsm");
const {ScratchpadManager} = scopedCuImport("resource:///modules/devtools/client/scratchpad/scratchpad-manager.jsm");
const {require} = scopedCuImport("resource://gre/modules/devtools/shared/Loader.jsm");

View File

@ -25,7 +25,7 @@ waitForExplicitFinish();
var {require} = Cu.import("resource://gre/modules/devtools/shared/Loader.jsm", {});
var {TargetFactory} = require("devtools/client/framework/target");
var {console} = Cu.import("resource://gre/modules/devtools/shared/Console.jsm", {});
var {console} = Cu.import("resource://gre/modules/Console.jsm", {});
var DevToolsUtils = require("devtools/shared/DevToolsUtils");
var promise = require("promise");

View File

@ -7,7 +7,7 @@
var Cu = Components.utils;
var {gDevTools} = Cu.import("resource:///modules/devtools/client/framework/gDevTools.jsm", {});
var {require} = Cu.import("resource://gre/modules/devtools/shared/Loader.jsm", {});
var {console} = Cu.import("resource://gre/modules/devtools/shared/Console.jsm", {});
var {console} = Cu.import("resource://gre/modules/Console.jsm", {});
var {TargetFactory} = require("devtools/client/framework/target");
var promise = require("promise");
var DevToolsUtils = require("devtools/shared/DevToolsUtils");

View File

@ -10,7 +10,7 @@ var {utils: Cu, interfaces: Ci, classes: Cc} = Components;
Cu.import("resource://gre/modules/Task.jsm");
const {require} = Cu.import("resource://gre/modules/devtools/shared/Loader.jsm", {});
Cu.import("resource://gre/modules/devtools/shared/Console.jsm");
Cu.import("resource://gre/modules/Console.jsm");
Cu.import("resource:///modules/devtools/client/shared/widgets/ViewHelpers.jsm");
const {InplaceEditor, editableItem} = require("devtools/client/shared/inplace-editor");

View File

@ -5,7 +5,7 @@
var Cu = Components.utils;
var {require} = Cu.import("resource://gre/modules/devtools/shared/Loader.jsm", {});
var {TargetFactory} = require("devtools/client/framework/target");
var {console} = Cu.import("resource://gre/modules/devtools/shared/Console.jsm", {});
var {console} = Cu.import("resource://gre/modules/Console.jsm", {});
var promise = require("promise");
var {getInplaceEditorForSpan: inplaceEditor} = require("devtools/client/shared/inplace-editor");
var clipboard = require("sdk/clipboard");

View File

@ -6,7 +6,7 @@
var { classes: Cc, interfaces: Ci, utils: Cu, results: Cr } = Components;
var { Services } = Cu.import("resource://gre/modules/Services.jsm", {});
var { gDevTools } = Cu.import("resource:///modules/devtools/client/framework/gDevTools.jsm", {});
var { console } = Cu.import("resource://gre/modules/devtools/shared/Console.jsm", {});
var { console } = Cu.import("resource://gre/modules/Console.jsm", {});
var { require } = Cu.import("resource://gre/modules/devtools/shared/Loader.jsm", {});
var { TargetFactory } = require("devtools/client/framework/target");
var DevToolsUtils = require("devtools/shared/DevToolsUtils");

View File

@ -9,7 +9,7 @@ var { Preferences } = Cu.import("resource://gre/modules/Preferences.jsm", {});
var { Task } = Cu.import("resource://gre/modules/Task.jsm", {});
var { require } = Cu.import("resource://gre/modules/devtools/shared/Loader.jsm", {});
var { gDevTools } = Cu.import("resource:///modules/devtools/client/framework/gDevTools.jsm", {});
var { console } = require("resource://gre/modules/devtools/shared/Console.jsm");
var { console } = require("resource://gre/modules/Console.jsm");
var { TargetFactory } = require("devtools/client/framework/target");
var Promise = require("promise");
var DevToolsUtils = require("devtools/shared/DevToolsUtils");
@ -291,7 +291,7 @@ function consoleExecute (console, method, val) {
ui.on("new-messages", handler);
jsterm.execute(message);
let { console: c } = Cu.import("resource://gre/modules/devtools/shared/Console.jsm", {});
let { console: c } = Cu.import("resource://gre/modules/Console.jsm", {});
function handler (event, messages) {
for (let msg of messages) {
if (msg.response._message === message) {

View File

@ -6,9 +6,8 @@ var { classes: Cc, interfaces: Ci, utils: Cu, results: Cr } = Components;
var { require } = Cu.import("resource://gre/modules/devtools/shared/Loader.jsm", {});
var { Services } = Cu.import("resource://gre/modules/Services.jsm", {});
var { console } = require("resource://gre/modules/devtools/shared/Console.jsm");
var { console } = require("resource://gre/modules/Console.jsm");
const RecordingUtils = require("devtools/shared/performance/recording-utils");
const PLATFORM_DATA_PREF = "devtools.performance.ui.show-platform-data";
/**

View File

@ -5,7 +5,7 @@
var Cu = Components.utils;
const {require} = Cu.import("resource://gre/modules/devtools/shared/Loader.jsm", {});
const {TargetFactory} = require("devtools/client/framework/target");
const {console} = Cu.import("resource://gre/modules/devtools/shared/Console.jsm", {});
const {console} = Cu.import("resource://gre/modules/Console.jsm", {});
const promise = require("promise");
const {FileUtils} = Cu.import("resource://gre/modules/FileUtils.jsm", {});
const {NetUtil} = Cu.import("resource://gre/modules/NetUtil.jsm", {});

View File

@ -6,7 +6,7 @@
const {NetUtil} = Cu.import("resource://gre/modules/NetUtil.jsm", {});
const {FileUtils} = Cu.import("resource://gre/modules/FileUtils.jsm", {});
const {console} = Cu.import("resource://gre/modules/devtools/shared/Console.jsm", {});
const {console} = Cu.import("resource://gre/modules/Console.jsm", {});
const {require} = Cu.import("resource://gre/modules/devtools/shared/Loader.jsm", {});
const {Services} = Cu.import("resource://gre/modules/Services.jsm", {});
const DevToolsUtils = require("devtools/shared/DevToolsUtils");

View File

@ -10,7 +10,7 @@ Cu.import("resource://gre/modules/XPCOMUtils.jsm");
Cu.import("resource://gre/modules/Task.jsm");
Cu.import("resource:///modules/devtools/client/shared/widgets/SideMenuWidget.jsm");
Cu.import("resource:///modules/devtools/client/shared/widgets/ViewHelpers.jsm");
Cu.import("resource://gre/modules/devtools/shared/Console.jsm");
Cu.import("resource://gre/modules/Console.jsm");
const {require} = Cu.import("resource://gre/modules/devtools/shared/Loader.jsm", {});
const promise = require("promise");

View File

@ -20,7 +20,7 @@ const promise = require("promise");
const Node = Ci.nsIDOMNode;
XPCOMUtils.defineLazyModuleGetter(this, "console",
"resource://gre/modules/devtools/shared/Console.jsm");
"resource://gre/modules/Console.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "PluralForm",
"resource://gre/modules/PluralForm.jsm");

View File

@ -4,7 +4,7 @@
var {require} = Cu.import("resource://gre/modules/devtools/shared/Loader.jsm", {});
var {TargetFactory} = require("devtools/client/framework/target");
var {console} = Cu.import("resource://gre/modules/devtools/shared/Console.jsm", {});
var {console} = Cu.import("resource://gre/modules/Console.jsm", {});
var {gDevTools} = Cu.import("resource:///modules/devtools/client/framework/gDevTools.jsm", {});
const {DOMHelpers} = Cu.import("resource:///modules/devtools/client/shared/DOMHelpers.jsm", {});
const {Hosts} = require("devtools/client/framework/toolbox-hosts");

View File

@ -14,7 +14,7 @@ XPCOMUtils.defineLazyModuleGetter(this, "EventEmitter",
"resource://gre/modules/devtools/shared/event-emitter.js");
XPCOMUtils.defineLazyModuleGetter(this, "console",
"resource://gre/modules/devtools/shared/Console.jsm");
"resource://gre/modules/Console.jsm");
this.EXPORTED_SYMBOLS = ["AbstractTreeItem"];

View File

@ -27,7 +27,7 @@ XPCOMUtils.defineLazyGetter(this, "VARIABLES_SORTING_ENABLED", () =>
);
XPCOMUtils.defineLazyModuleGetter(this, "console",
"resource://gre/modules/devtools/shared/Console.jsm");
"resource://gre/modules/Console.jsm");
const MAX_LONG_STRING_LENGTH = 200000;
const MAX_PROPERTY_ITEMS = 2000;

View File

@ -4,7 +4,7 @@
"use strict";
var { console } = Cu.import("resource://gre/modules/devtools/shared/Console.jsm", {});
var { console } = Cu.import("resource://gre/modules/Console.jsm", {});
var { require } = Cu.import("resource://gre/modules/devtools/shared/Loader.jsm", {});
var { TargetFactory } = require("devtools/client/framework/target");
var promise = require("promise");

View File

@ -28,7 +28,7 @@ XPCOMUtils.defineLazyModuleGetter(this, "PluralForm",
const { require } = Cu.import("resource://gre/modules/devtools/shared/Loader.jsm", {});
const { PrefObserver, PREF_ORIG_SOURCES } = require("devtools/client/styleeditor/utils");
const csscoverage = require("devtools/server/actors/csscoverage");
const console = require("resource://gre/modules/devtools/shared/Console.jsm").console;
const console = require("resource://gre/modules/Console.jsm").console;
const promise = require("promise");
const LOAD_ERROR = "error-load";

View File

@ -23,7 +23,7 @@ Cu.import("resource://gre/modules/Services.jsm");
const PROPERTIES_URL = "chrome://browser/locale/devtools/styleeditor.properties";
const {require} = Cu.import("resource://gre/modules/devtools/shared/Loader.jsm", {});
const console = require("resource://gre/modules/devtools/shared/Console.jsm").console;
const console = require("resource://gre/modules/Console.jsm").console;
const gStringBundle = Services.strings.createBundle(PROPERTIES_URL);

View File

@ -15,7 +15,7 @@ const {require} = Cu.import("resource://gre/modules/devtools/shared/Loader.jsm",
const Editor = require("devtools/client/sourceeditor/editor");
const promise = require("promise");
const {CssLogic} = require("devtools/shared/styleinspector/css-logic");
const {console} = require("resource://gre/modules/devtools/shared/Console.jsm");
const {console} = require("resource://gre/modules/Console.jsm");
Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource://gre/modules/FileUtils.jsm");

View File

@ -9,7 +9,7 @@ const TEST_HOST = 'mochi.test:8888';
var {require} = Cu.import("resource://gre/modules/devtools/shared/Loader.jsm", {});
var {TargetFactory} = require("devtools/client/framework/target");
var {console} = Cu.import("resource://gre/modules/devtools/shared/Console.jsm", {});
var {console} = Cu.import("resource://gre/modules/Console.jsm", {});
var promise = require("promise");
var DevToolsUtils = require("devtools/shared/DevToolsUtils");

View File

@ -16,7 +16,7 @@ var promise = require("promise");
var {editableField, getInplaceEditorForSpan: inplaceEditor} =
require("devtools/client/shared/inplace-editor");
var {console} =
Components.utils.import("resource://gre/modules/devtools/shared/Console.jsm", {});
Components.utils.import("resource://gre/modules/Console.jsm", {});
// All tests are asynchronous
waitForExplicitFinish();

View File

@ -12,7 +12,7 @@ Cu.import("resource:///modules/devtools/client/framework/gDevTools.jsm");
const { loader, require } = Cu.import("resource://gre/modules/devtools/shared/Loader.jsm", {});
var { console } = Cu.import("resource://gre/modules/devtools/shared/Console.jsm", {});
var { console } = Cu.import("resource://gre/modules/Console.jsm", {});
var { EventTarget } = require("sdk/event/target");
const { Task } = Cu.import("resource://gre/modules/Task.jsm", {});

View File

@ -21,7 +21,7 @@ add_task(function*() {
let storage = consoleStorage.getService(Ci.nsIConsoleAPIStorage);
storage.clearEvents();
let {console} = Cu.import("resource://gre/modules/devtools/shared/Console.jsm", {});
let {console} = Cu.import("resource://gre/modules/Console.jsm", {});
console.log("bug861338-log-cached");
let hud = yield HUDService.toggleBrowserConsole();
@ -153,7 +153,7 @@ add_task(function* testPrefix() {
let storage = consoleStorage.getService(Ci.nsIConsoleAPIStorage);
storage.clearEvents();
let {ConsoleAPI} = Cu.import("resource://gre/modules/devtools/shared/Console.jsm", {});
let {ConsoleAPI} = Cu.import("resource://gre/modules/Console.jsm", {});
let consoleOptions = {
maxLogLevel: "error",
prefix: "Log Prefix",
@ -184,7 +184,7 @@ add_task(function* testMaxLogLevelPrefMissing() {
let storage = consoleStorage.getService(Ci.nsIConsoleAPIStorage);
storage.clearEvents();
let {ConsoleAPI} = Cu.import("resource://gre/modules/devtools/shared/Console.jsm", {});
let {ConsoleAPI} = Cu.import("resource://gre/modules/Console.jsm", {});
let consoleOptions = {
maxLogLevel: "error",
maxLogLevelPref: "testing.maxLogLevel",
@ -223,7 +223,7 @@ add_task(function* testMaxLogLevelPref() {
let storage = consoleStorage.getService(Ci.nsIConsoleAPIStorage);
storage.clearEvents();
let {ConsoleAPI} = Cu.import("resource://gre/modules/devtools/shared/Console.jsm", {});
let {ConsoleAPI} = Cu.import("resource://gre/modules/Console.jsm", {});
let consoleOptions = {
maxLogLevel: "error",
maxLogLevelPref: "testing.maxLogLevel",

View File

@ -6,7 +6,7 @@
"use strict";
var {gDevTools} = Cu.import("resource:///modules/devtools/client/framework/gDevTools.jsm", {});
var {console} = Cu.import("resource://gre/modules/devtools/shared/Console.jsm", {});
var {console} = Cu.import("resource://gre/modules/Console.jsm", {});
var {Task} = Cu.import("resource://gre/modules/Task.jsm", {});
var {require} = Cu.import("resource://gre/modules/devtools/shared/Loader.jsm", {});
var promise = require("promise");

View File

@ -7,7 +7,7 @@ var Ci = Components.interfaces;
var Cu = Components.utils;
Cu.import("resource://gre/modules/Services.jsm");
const {console} = Cu.import("resource://gre/modules/devtools/shared/Console.jsm", {});
const {console} = Cu.import("resource://gre/modules/Console.jsm", {});
const {require} = Cu.import("resource://gre/modules/devtools/shared/Loader.jsm", {});
const {DebuggerClient} = require("devtools/shared/client/main");
const {DebuggerServer} = require("devtools/server/main");

View File

@ -185,7 +185,7 @@ function tryImport(url) {
}
tryImport("resource://gre/modules/devtools/shared/Loader.jsm");
tryImport("resource://gre/modules/devtools/shared/Console.jsm");
tryImport("resource://gre/modules/Console.jsm");
function testExceptionHook(ex) {
try {

View File

@ -393,7 +393,7 @@ DevToolsLoader.prototype = {
};
// Lazy define console in order to load Console.jsm only when it is used
XPCOMUtils.defineLazyGetter(this._provider.globals, "console", () => {
return Cu.import("resource://gre/modules/devtools/shared/Console.jsm", {}).console;
return Cu.import("resource://gre/modules/Console.jsm", {}).console;
});
this._provider.load();

View File

@ -17,7 +17,7 @@
this.EXPORTED_SYMBOLS = [ "template" ];
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "console",
"resource://gre/modules/devtools/shared/Console.jsm");
"resource://gre/modules/Console.jsm");
'use strict';

View File

@ -35,7 +35,6 @@ XPCSHELL_TESTS_MANIFESTS += ['tests/unit/xpcshell.ini']
DevToolsModules(
'async-storage.js',
'async-utils.js',
'Console.jsm',
'content-observer.js',
'css-color.js',
'deprecated-sync-thenables.js',

View File

@ -9,7 +9,7 @@ const { require } = Cu.import("resource://gre/modules/devtools/shared/Loader.jsm
this.sourceMap = require("source-map");
this.acorn = require("acorn/acorn");
this.prettyFast = require("devtools/shared/pretty-fast/pretty-fast");
const { console } = Cu.import("resource://gre/modules/devtools/shared/Console.jsm", {});
const { console } = Cu.import("resource://gre/modules/Console.jsm", {});
// Register a console listener, so console messages don't just disappear
// into the ether.

View File

@ -17,8 +17,8 @@ const WARNING_PREF = "devtools.migration.warnings";
if (Services.prefs.getBoolPref(WARNING_PREF)) {
const { Deprecated } = Cu.import("resource://gre/modules/Deprecated.jsm", {});
Deprecated.warning("This path to Console.jsm is deprecated. Please use " +
"Cu.import(\"resource://gre/modules/devtools/shared/" +
"Console.jsm\") to load this module.",
"Cu.import(\"resource://gre/modules/Console.jsm\") " +
"to load this module.",
"https://bugzil.la/912121");
}
@ -28,7 +28,7 @@ this.EXPORTED_SYMBOLS = [
];
const module =
Cu.import("resource://gre/modules/devtools/shared/Console.jsm", {});
Cu.import("resource://gre/modules/Console.jsm", {});
for (let symbol of this.EXPORTED_SYMBOLS) {
this[symbol] = module[symbol];

View File

@ -15,3 +15,8 @@ EXTRA_JS_MODULES.devtools += [
'Loader.jsm',
'Simulator.jsm',
]
# Extra compatibility layer for transitional URL used in middle of fx44 cycle
EXTRA_JS_MODULES.devtools.shared += [
'Console.jsm',
]

View File

@ -1,7 +1,7 @@
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
const { console, ConsoleAPI } = Cu.import("resource://gre/modules/devtools/shared/Console.jsm");
const { console, ConsoleAPI } = Cu.import("resource://gre/modules/Console.jsm");
const { ConsoleAPIListener } = require("devtools/shared/webconsole/utils");

View File

@ -11,7 +11,7 @@ Cu.import("resource://gre/modules/Services.jsm");
const {Task} = Cu.import("resource://gre/modules/Task.jsm", {});
// This gives logging to stdout for tests
var {console} = Cu.import("resource://gre/modules/devtools/shared/Console.jsm", {});
var {console} = Cu.import("resource://gre/modules/Console.jsm", {});
var {require} = Cu.import("resource://gre/modules/devtools/shared/Loader.jsm", {});
var WebConsoleUtils = require("devtools/shared/webconsole/utils").Utils;

View File

@ -18,7 +18,7 @@ let expectedConsoleCalls = [];
function doConsoleCalls(aState)
{
let { ConsoleAPI } = Cu.import("resource://gre/modules/devtools/shared/Console.jsm", {});
let { ConsoleAPI } = Cu.import("resource://gre/modules/Console.jsm", {});
let console = new ConsoleAPI({
innerID: window.QueryInterface(Ci.nsIInterfaceRequestor)
.getInterface(Ci.nsIDOMWindowUtils)

View File

@ -13,7 +13,7 @@
const { require } = Cu.import("resource://gre/modules/devtools/shared/Loader.jsm", {});
this.isWorker = false;
this.Promise = Cu.import("resource://gre/modules/Promise.jsm", {}).Promise;
this.console = Cu.import("resource://gre/modules/devtools/shared/Console.jsm", {}).console;
this.console = Cu.import("resource://gre/modules/Console.jsm", {}).console;
factory.call(
this, require, this, { exports: this },
{ Cc, Ci, Cu }, ChromeWorker, null

View File

@ -32,7 +32,7 @@ const orientationTypes = new Set(['any', 'natural', 'landscape', 'portrait',
'portrait-primary', 'portrait-secondary', 'landscape-primary',
'landscape-secondary'
]);
Cu.import('resource://gre/modules/devtools/shared/Console.jsm');
Cu.import('resource://gre/modules/Console.jsm');
// ValueExtractor is used by the various processors to get values
// from the manifest and to report errors.
Cu.import('resource://gre/modules/ValueExtractor.jsm');

View File

@ -4,7 +4,7 @@
"use strict";
XPCOMUtils.defineLazyModuleGetter(this, "ConsoleAPI",
"resource://gre/modules/devtools/shared/Console.jsm");
"resource://gre/modules/Console.jsm");
/*
* Collection of methods and features specific to using a GeckoView instance.

View File

@ -31,7 +31,7 @@ XPCOMUtils.defineLazyModuleGetter(this, "SelfSupportBackend",
var nativeConsole = console;
XPCOMUtils.defineLazyModuleGetter(this, "console",
"resource://gre/modules/devtools/shared/Console.jsm");
"resource://gre/modules/Console.jsm");
const SIMPLETEST_OVERRIDES =
["ok", "is", "isnot", "todo", "todo_is", "todo_isnot", "info", "expectAssertions", "requestCompleteLog"];

View File

@ -13,7 +13,7 @@ Cu.import("resource://gre/modules/XPCOMUtils.jsm");
Cu.import("resource://gre/modules/Preferences.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "console",
"resource://gre/modules/devtools/shared/Console.jsm");
"resource://gre/modules/Console.jsm");
function section(number, url)
{

View File

@ -44,7 +44,7 @@ this.LoginHelper = {
};
// Create a new instance of the ConsoleAPI so we can control the maxLogLevel with a pref.
let ConsoleAPI = Cu.import("resource://gre/modules/devtools/shared/Console.jsm", {}).ConsoleAPI;
let ConsoleAPI = Cu.import("resource://gre/modules/Console.jsm", {}).ConsoleAPI;
let consoleOptions = {
maxLogLevel: getMaxLogLevel(),
prefix: aLogPrefix,

View File

@ -16,7 +16,7 @@ XPCOMUtils.defineLazyModuleGetter(this, "Preferences",
XPCOMUtils.defineLazyModuleGetter(this, "Task",
"resource://gre/modules/Task.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "console",
"resource://gre/modules/devtools/shared/Console.jsm");
"resource://gre/modules/Console.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "PerformanceStats",
"resource://gre/modules/PerformanceStats.jsm");
XPCOMUtils.defineLazyServiceGetter(this, "Telemetry",

View File

@ -185,7 +185,7 @@ XPCOMUtils.defineLazyModuleGetter(this, "NetUtil",
XPCOMUtils.defineLazyModuleGetter(this, "PlacesUtils",
"resource://gre/modules/PlacesUtils.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "console",
"resource://gre/modules/devtools/shared/Console.jsm");
"resource://gre/modules/Console.jsm");
Components.utils.importGlobalProperties(["URL"]);

View File

@ -353,7 +353,7 @@ PopupBlocking.init();
XPCOMUtils.defineLazyGetter(this, "console", () => {
// Set up console.* for frame scripts.
let Console = Components.utils.import("resource://gre/modules/devtools/shared/Console.jsm", {});
let Console = Components.utils.import("resource://gre/modules/Console.jsm", {});
return new Console.ConsoleAPI();
});

View File

@ -36,7 +36,7 @@ XPCOMUtils.defineLazyServiceGetter(this, "FinalizationWitnessService",
XPCOMUtils.defineLazyModuleGetter(this, "PromiseUtils",
"resource://gre/modules/PromiseUtils.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "console",
"resource://gre/modules/devtools/shared/Console.jsm");
"resource://gre/modules/Console.jsm");
// Regular expression used by isInvalidBoundLikeQuery
var likeSqlRegex = /\bLIKE\b\s(?![@:?])/i;

View File

@ -24,6 +24,7 @@ EXTRA_JS_MODULES += [
'CertUtils.jsm',
'CharsetMenu.jsm',
'ClientID.jsm',
'Console.jsm',
'debug.js',
'DeferredTask.jsm',
'Deprecated.jsm',

View File

@ -41,7 +41,7 @@ XPCOMUtils.defineLazyModuleGetter(this, "OS",
XPCOMUtils.defineLazyModuleGetter(this, "BrowserToolboxProcess",
"resource:///modules/devtools/client/framework/ToolboxProcess.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "ConsoleAPI",
"resource://gre/modules/devtools/shared/Console.jsm");
"resource://gre/modules/Console.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "ProductAddonChecker",
"resource://gre/modules/addons/ProductAddonChecker.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "UpdateUtils",