Closed Bug 604457 Opened 14 years ago Closed 14 years ago

switchToTabHavingURI shouldn't close selected tab or revert URL bar

Categories

(Firefox :: General, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 4.0b8

People

(Reporter: Gavin, Assigned: dao)

References

Details

Attachments

(1 file, 1 obsolete file)

Closing the selected tab and reverting the URL bar are autocomplete-specific actions, so they should be done in the urlbarBindings handler if switchToTabHavingURI returns true. They aren't useful for other callers of switchToTabHavingURI (e.g. opening the addons manager).
Attached patch patch (obsolete) (deleted) — Splinter Review
I don't think the return value needs to be checked here, switchToTabHavingURI should always succeed.
Assignee: nobody → dao
Status: NEW → ASSIGNED
Attachment #488450 - Flags: review?(gavin.sharp)
Comment on attachment 488450 [details] [diff] [review] patch I think you should check the return value before calling removeTab(prevTab), because we have bugs where we end up calling switchToTabHavingURI for nonexistent URIs (bug 558626), and it doesn't really hurt to be resilient. r=me with that.
Attachment #488450 - Flags: review?(gavin.sharp) → review+
Attached patch patch (deleted) — Splinter Review
Attachment #488450 - Attachment is obsolete: true
Attachment #488641 - Flags: approval2.0?
Attachment #488641 - Flags: approval2.0? → approval2.0+
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 4.0b8
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: