Closed Bug 448583 Opened 17 years ago Closed 17 years ago

remove isNil function from DownloadUtils.jsm

Categories

(Toolkit :: Downloads API, defect)

defect
Not set
normal

Tracking

()

VERIFIED FIXED
mozilla1.9.1a2

People

(Reporter: dao, Assigned: Mardak)

References

()

Details

Attachments

(1 file, 1 obsolete file)

There's an "isNil" function in DownloadUtils.jsm that returns "(aArg == null) || (aArg == undefined)", which is pointless since null == undefined. Instead of "if (isNil(foo))", "if (foo == null)" should be used.
Attached patch v1 (obsolete) — Splinter Review
Should be reasonable to assume nobody is going to assign undefined to something else in this scope.
Assignee: nobody → edilee
Status: NEW → ASSIGNED
Attachment #331792 - Flags: review?(sdwilsh)
Comment on attachment 331792 [details] [diff] [review] v1 r=sdwilsh
Attachment #331792 - Flags: review?(sdwilsh) → review+
Attached patch v1.1Splinter Review
No test required?! ;) Silly do_check_eq doesn't flatten arrays, so [0] !== [0] but [0].toString()s do. Putting the test with the other DownloadUtils tests.. toolkit/mozapps/downloads/tests/unit/test_undefinedDownloadUtils.js You've got until the tree goes green to decide if you want to change the name! :p
Attachment #331792 - Attachment is obsolete: true
ewww name how about test_unspecified_arguments.js
Product: Firefox → Toolkit
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Flags: in-testsuite+
Flags: in-litmus-
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.1a2
Verified FIXED via MXR: isNil Searching... Pattern too long. Use a maximum 29 characters. No matching files Found one matching line Found 012345678901234567890123456789 matching lines in 012345678901234567890123456789 files Too many hits, displaying the first 1000 No results found
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: