Closed
Bug 822056
Opened 13 years ago
Closed 13 years ago
Use truthy test not typeof == "object" for OpenBrowserWindow options in browser.js
Categories
(Firefox :: General, defect)
Firefox
General
Tracking
()
RESOLVED
FIXED
Firefox 20
People
(Reporter: fryn, Assigned: fryn)
References
Details
Attachments
(1 file)
|
1.21 KB,
patch
|
Gavin
:
review+
|
Details | Diff | Splinter Review |
The pattern:
if (foo && foo.bar)
is usually better than:
if (typeof foo == "object" && foo.bar)
because foo could be null (and typeof null == "object") and other reasons.
This was caught by some test bustage following the landing of per-window private browsing.
| Assignee | ||
Comment 1•13 years ago
|
||
Attachment #692663 -
Flags: review?(gavin.sharp)
Updated•13 years ago
|
Attachment #692663 -
Flags: review?(gavin.sharp) → review+
| Assignee | ||
Comment 2•13 years ago
|
||
Target Milestone: --- → Firefox 20
Comment 3•13 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•