Closed
Bug 1218870
Opened 9 years ago
Closed 9 years ago
typeof "foo" != "undefined" tests are always true
Categories
(Toolkit Graveyard :: OS.File, defect)
Toolkit Graveyard
OS.File
Tracking
(firefox44 affected, firefox45 fixed, b2g-v2.5 fixed)
RESOLVED
FIXED
mozilla45
People
(Reporter: florian, Assigned: hanue, Mentored)
Details
(Whiteboard: [lang=js][good first bug])
Attachments
(1 file, 1 obsolete file)
4.10 KB,
patch
|
Yoric
:
review+
|
Details | Diff | Splinter Review |
|typeof "foo"| returns "string", so there tests in the osfile code that always pass: /toolkit/components/osfile/modules/osfile_unix_allthreads.jsm line 31 -- } else if (typeof "module" != "undefined" && typeof "require" != "undefined") { /toolkit/components/osfile/modules/osfile_win_allthreads.jsm line 31 -- } else if (typeof "module" != "undefined" && typeof "require" != "undefined") { /toolkit/components/osfile/modules/ospath_unix.jsm line 28 -- } else if (typeof "module" == "undefined" || typeof "exports" == "undefined") { /toolkit/components/osfile/modules/ospath_win.jsm line 37 -- } else if (typeof "module" == "undefined" || typeof "exports" == "undefined") {
The objective of this bug is to take the few lines mentioned in comment 0 and replace `typeof "foo"` with `typeof foo` (where `foo` is `module` and `exports`).
Mentor: dteller
Whiteboard: [lang=js][good first bug]
Assignee | ||
Comment 2•9 years ago
|
||
Hello there! Please find attached my patch.
Attachment #8681647 -
Flags: review?(dteller)
Comment on attachment 8681647 [details] [diff] [review] rev1 - Statement check changes Review of attachment 8681647 [details] [diff] [review]: ----------------------------------------------------------------- Thanks for the patch, it looks good to me. Could you just change the commit message to something along the lines of: Bug 1218870 - Fix uses of typeof "foo" in OS.File;r=yoric Let's see how it works on our tests: https://treeherder.mozilla.org/#/jobs?repo=try&revision=35b9f232b192
Attachment #8681647 -
Flags: review?(dteller) → review+
Assignee | ||
Comment 4•9 years ago
|
||
Hello David! Thank you for your feedback. I have just updated the commit message accordingly.
Attachment #8681659 -
Flags: review?(dteller)
Comment on attachment 8681659 [details] [diff] [review] rev2 - Fix uses of typeof "foo" in OS.File;r=yoric Review of attachment 8681659 [details] [diff] [review]: ----------------------------------------------------------------- Looks good to me. Also, the tests pass, so if you're ready, we can mark that code for landing.
Attachment #8681659 -
Flags: review?(dteller) → review+
Attachment #8681647 -
Attachment is obsolete: true
Assignee: nobody → hanue
Assignee | ||
Comment 6•9 years ago
|
||
Awesome! Do I need to do anything else or that's it?
I just marked the code for landing. It should land shortly (we're currently experimenting with a new system, so I can't tell you exactly how long). You'll be recontacted in the unlikely case it causes a problem. Are you interested in working on another mentored bug? For instance, would you be interested in bug 1218746?
Keywords: checkin-needed
Comment 9•9 years ago
|
||
(In reply to David Rajchenbach-Teller [:Yoric] (use "needinfo") from comment #7) > I just marked the code for landing. It should land shortly (we're currently > experimenting with a new system, so I can't tell you exactly how long). > You'll be recontacted in the unlikely case it causes a problem. > > Are you interested in working on another mentored bug? For instance, would > you be interested in bug 1218746? Landed as https://hg.mozilla.org/integration/fx-team/rev/20ec21d1280b (and no, i'm not the new system ;)
Comment 10•9 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/20ec21d1280b
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox45:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla45
Comment 11•9 years ago
|
||
bugherder uplift |
https://hg.mozilla.org/releases/mozilla-b2g44_v2_5/rev/20ec21d1280b
status-b2g-v2.5:
--- → fixed
Assignee | ||
Comment 12•9 years ago
|
||
(In reply to David Rajchenbach-Teller [:Yoric] (use "needinfo") from comment #7) > I just marked the code for landing. It should land shortly (we're currently > experimenting with a new system, so I can't tell you exactly how long). > You'll be recontacted in the unlikely case it causes a problem. > > Are you interested in working on another mentored bug? For instance, would > you be interested in bug 1218746? I am happy I could help, David! Sure, I will have a look on this bug as well.
Updated•11 months ago
|
Product: Toolkit → Toolkit Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•