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)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 20

People

(Reporter: fryn, Assigned: fryn)

References

Details

Attachments

(1 file)

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.
Attached patch patchSplinter Review
Attachment #692663 - Flags: review?(gavin.sharp)
Attachment #692663 - Flags: review?(gavin.sharp) → review+
Target Milestone: --- → Firefox 20
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.

Attachment

General

Created:
Updated:
Size: