Closed
Bug 1154228
Opened 10 years ago
Closed 10 years ago
Unreachable expression after return statement in toLocalTimeISOString.
Categories
(Toolkit :: Telemetry, defect)
Toolkit
Telemetry
Tracking
()
RESOLVED
FIXED
mozilla40
Tracking | Status | |
---|---|---|
firefox38 | --- | unaffected |
firefox39 | --- | fixed |
firefox40 | --- | fixed |
People
(Reporter: arai, Assigned: arai, Mentored)
References
Details
Attachments
(1 file)
(deleted),
patch
|
gfritzsche
:
review+
lmandel
:
approval-mozilla-aurora+
|
Details | Diff | Splinter Review |
in toLocalTimeISOString in toolkit/components/telemetry/TelemetrySession.jsm, semicolon is placed middle of expression, and it results in milliseconds and timezone are omitted from the return value.
https://dxr.mozilla.org/mozilla-central/source/toolkit/components/telemetry/TelemetrySession.jsm#242
> return padNumber(date.getFullYear(), 4)
> + "-" + padNumber(date.getMonth() + 1, 2)
> + "-" + padNumber(date.getDate(), 2)
> + "T" + padNumber(date.getHours(), 2)
> + ":" + padNumber(date.getMinutes(), 2)
> + ":" + padNumber(date.getSeconds(), 2); <= here!
> + "." + date.getMilliseconds()
> + sign(tzOffset) + Math.abs(Math.floor(tzOffset / 60))
> + ":" + Math.abs(tzOffset % 60);
not sure which is the right solution to remove the semicolon or remove remaining expressions.
Comment 2•10 years ago
|
||
Ah, thanks, good catch.
The right solution would be to remove the semicolon, ideally the xpcshell tests in toolkit/components/telemetry/tests/unit continue to run through fine.
Were you interested in taking this?
Flags: needinfo?(gfritzsche)
Updated•10 years ago
|
Component: Client: Desktop → Telemetry
Product: Firefox Health Report → Toolkit
Assignee | ||
Comment 4•10 years ago
|
||
Just removed semicolon.
Green on try run: https://treeherder.mozilla.org/#/jobs?repo=try&revision=57403fdcae3a
Attachment #8592229 -
Flags: review?(gfritzsche)
Comment 5•10 years ago
|
||
Comment on attachment 8592229 [details] [diff] [review]
Remove unnecessary semicolon in toLocalTimeISOString in TelemetrySession.jsm.
Review of attachment 8592229 [details] [diff] [review]:
-----------------------------------------------------------------
Thank you, that looks good.
Attachment #8592229 -
Flags: review?(gfritzsche) → review+
Updated•10 years ago
|
Status: NEW → ASSIGNED
Keywords: checkin-needed
Comment 6•10 years ago
|
||
Keywords: checkin-needed
Comment 7•10 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
status-firefox40:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla40
Updated•10 years ago
|
status-firefox38:
--- → unaffected
status-firefox39:
--- → affected
Comment 8•10 years ago
|
||
Comment on attachment 8592229 [details] [diff] [review]
Remove unnecessary semicolon in toLocalTimeISOString in TelemetrySession.jsm.
Approved for Aurora. For approval request see bug 1139460 comment 42. For approval comments see bug 1139460 comment 43.
Attachment #8592229 -
Flags: approval-mozilla-aurora+
Comment 9•10 years ago
|
||
You need to log in
before you can comment on or make changes to this bug.
Description
•