Add function to generate UUIDs

RESOLVED FIXED in Firefox 18

Status

RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: gps, Assigned: gps)

Tracking

unspecified
mozilla20
Points:
---
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(firefox18 fixed, firefox19 fixed, firefox20 fixed)

Details

Attachments

(1 attachment)

(Assignee)

Description

6 years ago
Created attachment 676361 [details] [diff] [review]
Add CommonUtils.generateUUID()

Add CommonUtils.generateUUID().
Attachment #676361 - Flags: review?(rnewman)
Comment on attachment 676361 [details] [diff] [review]
Add CommonUtils.generateUUID()

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

::: services/common/tests/unit/test_utils_uuid.js
@@ +5,5 @@
> +
> +function run_test() {
> +  let uuid = CommonUtils.generateUUID();
> +  do_check_eq(uuid.length, 36);
> +  do_check_eq(uuid[8], "-");

Your function comment says "with no extra characters". One of you is lying :D

::: services/common/utils.js
@@ +472,5 @@
> +   * Generate a new UUID.
> +   *
> +   * Returns a hex-formatted UUID string with no extra characters (like {}).
> +   *
> +   * @return string

This comment should probably be:

  Generate a new UUID using nsiUUIDGenerator, removing extraneous
  characters such as [{}].

  Example: "..."

  @return (string) a hex-formatted UUID string.

::: services/healthreport/service.jsm
@@ +115,5 @@
>      // TODO pull namespace from prefs
>      // TODO Generate UUID for ID
>      // TODO delete old ID if present.
> +    let promise = client.uploadJSON("healthreport", "foobar",
> +                                    this._getJSONPayload());

Pretty sure this snuck in by mistake.
Attachment #676361 - Flags: review?(rnewman) → review+
(Assignee)

Comment 2

6 years ago
https://hg.mozilla.org/projects/larch/rev/fb3d94492902
Status: NEW → ASSIGNED
Whiteboard: [fixed-in-larch]
Comment on attachment 676361 [details] [diff] [review]
Add CommonUtils.generateUUID()

Bulk-setting approval flags for FHR landing for FxOS ADU ping (Bug 788894).
Attachment #676361 - Flags: approval-mozilla-beta?
Attachment #676361 - Flags: approval-mozilla-aurora?
https://hg.mozilla.org/integration/mozilla-inbound/rev/86b0762e70ed
Assignee: nobody → gps
Whiteboard: [fixed-in-larch]
Target Milestone: --- → mozilla20
https://hg.mozilla.org/mozilla-central/rev/86b0762e70ed
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Flags: in-testsuite+
Resolution: --- → FIXED

Comment 6

6 years ago
Comment on attachment 676361 [details] [diff] [review]
Add CommonUtils.generateUUID()

FHR for B2G ADU ping, won't be built/enabled for Mobile/Desktop.
Attachment #676361 - Flags: approval-mozilla-beta?
Attachment #676361 - Flags: approval-mozilla-beta+
Attachment #676361 - Flags: approval-mozilla-aurora?
Attachment #676361 - Flags: approval-mozilla-aurora+
https://hg.mozilla.org/releases/mozilla-aurora/rev/e3f2f2c9f6ad
https://hg.mozilla.org/releases/mozilla-beta/rev/a05896ac7000
status-firefox18: --- → fixed
status-firefox19: --- → fixed
status-firefox20: --- → fixed
You need to log in before you can comment on or make changes to this bug.