mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 990057 - Fix Promise exception in simulator. r=jryans
This commit is contained in:
parent
acb270f1b0
commit
c5d51bce28
@ -6,7 +6,7 @@
|
||||
const { Cc, Ci, Cu } = require("chrome");
|
||||
|
||||
const { SimulatorProcess } = require("./simulator-process");
|
||||
const { Promise } = Cu.import("resource://gre/modules/Promise.jsm", {});
|
||||
const { Promise: promise } = Cu.import("resource://gre/modules/Promise.jsm", {});
|
||||
const Self = require("sdk/self");
|
||||
const System = require("sdk/system");
|
||||
const { Simulator } = Cu.import("resource://gre/modules/devtools/Simulator.jsm");
|
||||
@ -23,12 +23,12 @@ function launch({ port }) {
|
||||
process.remoteDebuggerPort = port;
|
||||
process.run();
|
||||
|
||||
return Promise.resolve();
|
||||
return promise.resolve();
|
||||
}
|
||||
|
||||
function close() {
|
||||
if (!process) {
|
||||
return Promise.resolve();
|
||||
return promise.resolve();
|
||||
}
|
||||
let p = process;
|
||||
process = null;
|
||||
|
@ -17,7 +17,7 @@ const Runtime = require("sdk/system/runtime");
|
||||
const Self = require("sdk/self");
|
||||
const URL = require("sdk/url");
|
||||
const Subprocess = require("subprocess");
|
||||
const { Promise } = Cu.import("resource://gre/modules/Promise.jsm", {});
|
||||
const { Promise: promise } = Cu.import("resource://gre/modules/Promise.jsm", {});
|
||||
|
||||
const { rootURI: ROOT_URI } = require('@loader/options');
|
||||
const PROFILE_URL = ROOT_URI + "profile/";
|
||||
@ -112,7 +112,7 @@ exports.SimulatorProcess = Class({
|
||||
|
||||
// request a b2g instance kill
|
||||
kill: function() {
|
||||
let deferred = Promise.defer();
|
||||
let deferred = promise.defer();
|
||||
if (this.process) {
|
||||
this.once("exit", (exitCode) => {
|
||||
this.shuttingDown = false;
|
||||
@ -125,7 +125,7 @@ exports.SimulatorProcess = Class({
|
||||
}
|
||||
return deferred.promise;
|
||||
} else {
|
||||
return Promise.resolve(undefined);
|
||||
return promise.resolve(undefined);
|
||||
}
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user