Closed Bug 1246031 Opened 9 years ago Closed 9 years ago

[commands] Create a utility for obtaining platform information

Categories

(WebExtensions :: Untriaged, defect)

defect
Not set
normal

Tracking

(firefox47 fixed)

RESOLVED FIXED
mozilla47
Iteration:
47.2 - Feb 22
Tracking Status
firefox47 --- fixed

People

(Reporter: mattw, Assigned: mattw)

References

(Blocks 1 open bug)

Details

(Whiteboard: [commands]triaged)

Attachments

(1 file, 2 obsolete files)

No description provided.
Whiteboard: [commands]triaged
Summary: Create a utility for obtaining platform information → [commands] Create a utility for obtaining platform information
Attached patch utility for obtaining platform information (obsolete) (deleted) — Splinter Review
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+
Attached patch utility for obtaining platform information (obsolete) (deleted) — Splinter Review
Attachment #8720116 - Flags: review?(kmaglione+bmo)
Attachment #8720116 - Flags: review?(kmaglione+bmo) → review+
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
Attachment #8720429 - Flags: review?(kmaglione+bmo) → review+
Attachment #8720116 - Attachment is obsolete: true
Flags: needinfo?(mwein)
Iteration: --- → 47.2 - Feb 22
Blocks: 1246028
Keywords: checkin-needed
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla47
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: