Closed
Bug 984809
Opened 11 years ago
Closed 11 years ago
Remove deprecated promise.js usage in B2G
Categories
(Firefox OS Graveyard :: General, defect)
Firefox OS Graveyard
General
Tracking
(Not tracked)
RESOLVED
FIXED
2.0 S1 (9may)
People
(Reporter: Paolo, Assigned: Paolo)
References
Details
Attachments
(1 file, 1 obsolete file)
(deleted),
patch
|
Details | Diff | Splinter Review |
The Add-on SDK Promises module is being deprecated in favor of Promise.jsm, so we're removing all references to it from mozilla-central.
Alexandre, do you think you can review this patch?
It doesn't seem to cause test failures on the B2G Emulator:
https://tbpl.mozilla.org/?tree=Try&rev=4c5112c67bb2
Attachment #8392790 -
Flags: review?(poirot.alex)
Comment 1•11 years ago
|
||
Comment on attachment 8392790 [details] [diff] [review]
The patch
Review of attachment 8392790 [details] [diff] [review]:
-----------------------------------------------------------------
r+ with the two changes mentioned.
::: b2g/simulator/lib/main.js
@@ +5,5 @@
>
> const { Cc, Ci, Cu } = require("chrome");
>
> const { SimulatorProcess } = require("./simulator-process");
> +const Promise = Cu.import("resource://gre/modules/Promise.jsm", {});
The require() was returning the Promise object, whereas Cu.import() returns an object with a Promise attribute. So that end up breaking this file.
That line should be:
const { Promise } = Cu.import("resource://gre/modules/Promise.jsm", {});
::: b2g/simulator/lib/simulator-process.js
@@ +16,5 @@
> 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", {});
Same thing here:
const { Promise } = Cu.import("resource://gre/modules/Promise.jsm", {});
Attachment #8392790 -
Flags: review?(poirot.alex) → review+
Assignee | ||
Comment 2•11 years ago
|
||
(In reply to Alexandre Poirot (:ochameau) from comment #1)
> So that end up breaking this file.
Strange that it wasn't caught, thanks for the correction!
Another tryserver run before push:
https://tbpl.mozilla.org/?tree=Try&rev=75d1899f9078
Attachment #8392790 -
Attachment is obsolete: true
Assignee | ||
Comment 3•11 years ago
|
||
Comment 4•11 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → 1.5 S1 (9may)
You need to log in
before you can comment on or make changes to this bug.
Description
•