mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 943672 - Convert to Promise.jsm in Scratchpad. r=anton
This commit is contained in:
parent
9b46b04043
commit
f47191f856
@ -5,8 +5,9 @@
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
"use strict";
|
||||
|
||||
const {Cu} = require("chrome");
|
||||
const EventEmitter = require("devtools/shared/event-emitter");
|
||||
const promise = require("sdk/core/promise");
|
||||
const {Promise: promise} = Cu.import("resource://gre/modules/Promise.jsm", {});
|
||||
|
||||
|
||||
function ScratchpadPanel(iframeWindow, toolbox) {
|
||||
@ -14,7 +15,7 @@ function ScratchpadPanel(iframeWindow, toolbox) {
|
||||
this._toolbox = toolbox;
|
||||
this.panelWin = iframeWindow;
|
||||
this.scratchpad = Scratchpad;
|
||||
|
||||
|
||||
Scratchpad.target = this.target;
|
||||
Scratchpad.hideMenu();
|
||||
|
||||
|
@ -33,11 +33,12 @@ const PREF_RECENT_FILES_MAX = "devtools.scratchpad.recentFilesMax";
|
||||
const VARIABLES_VIEW_URL = "chrome://browser/content/devtools/widgets/VariablesView.xul";
|
||||
|
||||
const require = Cu.import("resource://gre/modules/devtools/Loader.jsm", {}).devtools.require;
|
||||
const promise = require("sdk/core/promise");
|
||||
|
||||
const Telemetry = require("devtools/shared/telemetry");
|
||||
const Editor = require("devtools/sourceeditor/editor");
|
||||
const TargetFactory = require("devtools/framework/target").TargetFactory;
|
||||
|
||||
const { Promise: promise } = Cu.import("resource://gre/modules/Promise.jsm", {});
|
||||
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
Cu.import("resource://gre/modules/Services.jsm");
|
||||
Cu.import("resource://gre/modules/NetUtil.jsm");
|
||||
|
@ -4,16 +4,9 @@
|
||||
|
||||
"use strict";
|
||||
|
||||
let tempScope = {};
|
||||
|
||||
Cu.import("resource://gre/modules/NetUtil.jsm", tempScope);
|
||||
Cu.import("resource://gre/modules/FileUtils.jsm", tempScope);
|
||||
Cu.import("resource://gre/modules/commonjs/sdk/core/promise.js", tempScope);
|
||||
|
||||
|
||||
let NetUtil = tempScope.NetUtil;
|
||||
let FileUtils = tempScope.FileUtils;
|
||||
let promise = tempScope.Promise;
|
||||
const {NetUtil} = Cu.import("resource://gre/modules/NetUtil.jsm", {});
|
||||
const {FileUtils} = Cu.import("resource://gre/modules/FileUtils.jsm", {});
|
||||
const {Promise: promise} = Cu.import("resource://gre/modules/Promise.jsm", {});
|
||||
|
||||
let gScratchpadWindow; // Reference to the Scratchpad chrome window object
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user