Gfx info is not being properly reported in Telemetry

RESOLVED FIXED in mozilla28

Status

()

Toolkit
Telemetry
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: vladan, Assigned: vladan)

Tracking

Trunk
mozilla28
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

4 years ago
Created attachment 8335009 [details] [diff] [review]
Do a strict inequality comparison

We're not reporting any of the gfx system info fields whose value is boolean "false" because of a bad comparison in TelemetryPing.js

> false != ""
false

> false !== ""
true
Attachment #8335009 - Flags: review?(dteller)
Comment on attachment 8335009 [details] [diff] [review]
Do a strict inequality comparison

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

::: toolkit/components/telemetry/TelemetryPing.js
@@ +373,5 @@
>      if (gfxInfo) {
>        for each (let field in gfxfields) {
>          try {
>            let value = "";
>            value = gfxInfo[field];

Could you take the opportunity to make this
 let value = gfxInfo(field);
?

@@ +374,5 @@
>        for each (let field in gfxfields) {
>          try {
>            let value = "";
>            value = gfxInfo[field];
> +          if (value !== "") {

You'll need a comment to explain why you need a strict comparison here (i.e. it's not evident that we're comparing booleans with strings in some cases or that |"" == false|).
Attachment #8335009 - Flags: review?(dteller) → review+
https://hg.mozilla.org/mozilla-central/rev/038a45f0c9d5
Assignee: nobody → vdjeric
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla28
You need to log in before you can comment on or make changes to this bug.