[commands] Create a utility for obtaining platform information

RESOLVED FIXED in Firefox 47

Status

()

Toolkit
WebExtensions: Untriaged
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: mattw, Assigned: mattw)

Tracking

(Blocks: 1 bug)

unspecified
mozilla47
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox47 fixed)

Details

(Whiteboard: [commands]triaged)

Attachments

(1 attachment, 2 obsolete attachments)

Comment hidden (empty)

Updated

2 years ago
Whiteboard: [commands]triaged
(Assignee)

Updated

2 years ago
Summary: Create a utility for obtaining platform information → [commands] Create a utility for obtaining platform information
(Assignee)

Comment 1

2 years ago
Created attachment 8717724 [details] [diff] [review]
utility for obtaining platform information
Attachment #8717724 - Flags: review?(kmaglione+bmo)
Comment on attachment 8717724 [details] [diff] [review]
utility for obtaining platform information

Review of attachment 8717724 [details] [diff] [review]:
-----------------------------------------------------------------

::: toolkit/components/extensions/ExtensionUtils.jsm
@@ +935,5 @@
>  function flushJarCache(jarFile) {
>    Services.obs.notifyObservers(jarFile, "flush-cache-entry", null);
>  }
>  
> +function getPlatformInfo() {

I'd rather avoid defining this function if it's only ever going to be used once. We could just define `PlatformInfo`, create a block scope and define the `os` and `arch` properties from that, and then freeze the `PlatformInfo` object. Or we could generate it from an immediately invoking function expression.

@@ +952,5 @@
> +
> +  return {os, arch};
> +}
> +
> +const PlatformInfo = getPlatformInfo();

This should probably be `Object.freeze(getPlatformInfo())` if we're going to export it.
Attachment #8717724 - Flags: review?(kmaglione+bmo) → review+
(Assignee)

Comment 3

2 years ago
Created attachment 8720116 [details] [diff] [review]
utility for obtaining platform information
Attachment #8720116 - Flags: review?(kmaglione+bmo)
(Assignee)

Updated

2 years ago
Attachment #8720116 - Flags: review?(kmaglione+bmo) → review+
(Assignee)

Updated

2 years ago
Keywords: checkin-needed
Attachment #8717724 - Attachment is obsolete: true
hi, this failed to apply:

patching file toolkit/components/extensions/ext-runtime.js
Hunk #1 FAILED at 0
1 out of 2 hunks FAILED -- saving rejects to file toolkit/components/extensions/ext-runtime.js.rej
Flags: needinfo?(mwein)
Keywords: checkin-needed
(Assignee)

Comment 5

2 years ago
https://treeherder.mozilla.org/#/jobs?repo=try&revision=42f8b09f836d
(Assignee)

Comment 6

2 years ago
Created attachment 8720429 [details] [diff] [review]
Utility for obtaining platform information. try: -b do -p linux64,macosx64,win32,win64 -u mochitest,xpcshell
Attachment #8720429 - Flags: review?(kmaglione+bmo)
(Assignee)

Updated

2 years ago
Attachment #8720429 - Flags: review?(kmaglione+bmo) → review+
(Assignee)

Updated

2 years ago
Attachment #8720116 - Attachment is obsolete: true
Flags: needinfo?(mwein)
(Assignee)

Updated

2 years ago
Iteration: --- → 47.2 - Feb 22
(Assignee)

Updated

2 years ago
Blocks: 1246028
(Assignee)

Updated

2 years ago
Keywords: checkin-needed

Comment 7

2 years ago
https://hg.mozilla.org/integration/fx-team/rev/3e9b07b743d6
Keywords: checkin-needed

Comment 8

2 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/3e9b07b743d6
Status: NEW → RESOLVED
Last Resolved: 2 years ago
status-firefox47: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla47
You need to log in before you can comment on or make changes to this bug.