Closed Bug 1378833 Opened 3 years ago Closed 2 years ago

Stop using sdk/system/environment in WebIDE

Categories

(DevTools :: WebIDE, defect, P1)

defect

Tracking

(firefox56 fixed)

RESOLVED FIXED
Firefox 56
Tracking Status
firefox56 --- fixed

People

(Reporter: zer0, Assigned: jdescottes)

References

Details

(Whiteboard: [nosdk])

Attachments

(1 file)

Used id:

  devtools/client/webide/modules/simulator-process.js
Flags: qe-verify-
Whiteboard: [nosdk]
Attachment #8889611 - Flags: review?(poirot.alex)
Assignee: nobody → jdescottes
Status: NEW → ASSIGNED
Priority: P2 → P1
Target Milestone: --- → Firefox 56
Comment on attachment 8889611 [details]
Bug 1378833 - use Environment service instead of sdk/system/environment in WebIDE;

https://reviewboard.mozilla.org/r/160634/#review166210

::: devtools/client/webide/modules/simulator-process.js:83
(Diff revision 1)
>      if (OS.indexOf("linux") > -1) {
>        environment = ["TMPDIR=" + Services.dirsvc.get("TmpD", Ci.nsIFile).path];
> -      ["DISPLAY", "XAUTHORITY"].forEach(key => {
> -        if (key in Environment) {
> +      ["DISPLAY", "XAUTHORITY"]
> +        .filter(key => Environment.exists(key))
> +        .forEach(key => {
>            environment.push(key + "=" + Environment[key]);

nsIEnvironment doesn't expose "magic getters", you have to call "get" method:
s/Environment[key]/Environment.get(key)/
Attachment #8889611 - Flags: review?(poirot.alex) → review+
Comment on attachment 8889611 [details]
Bug 1378833 - use Environment service instead of sdk/system/environment in WebIDE;

https://reviewboard.mozilla.org/r/160634/#review166210

> nsIEnvironment doesn't expose "magic getters", you have to call "get" method:
> s/Environment[key]/Environment.get(key)/

Thanks for catching that!
Pushed by jdescottes@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/c6d36106525b
use Environment service instead of sdk/system/environment in WebIDE;r=ochameau
https://hg.mozilla.org/mozilla-central/rev/c6d36106525b
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.