Closed Bug 1282423 Opened 10 years ago Closed 10 years ago

browser.js: Open search detection wrong?

Categories

(Firefox for Android Graveyard :: General, defect)

All
Android
defect
Not set
normal

Tracking

(firefox50 fixed)

RESOLVED FIXED
Firefox 50
Tracking Status
firefox50 --- fixed

People

(Reporter: sebastian, Assigned: sebastian)

Details

Attachments

(1 file)

This line in browser.js looks like it's wrong: > list.indexOf("[search]" != -1) https://dxr.mozilla.org/mozilla-central/source/mobile/android/chrome/content/browser.js?q=path%3A%2Amobile%2A+path%3A%2Abrowser.js%2A&redirect_type=single#4156 Shouldn't this be: > list.indexOf("[search]") != -1
Assignee: nobody → s.kaspari
Status: NEW → ASSIGNED
Sigh... JavaScript! Bug 1225842 was verified, how is it even possible that this worked?
Comment on attachment 8765447 [details] Bug 1282423 - browser.js: Fix wrong open search expression. https://reviewboard.mozilla.org/r/60818/#review57642
Attachment #8765447 - Flags: review?(margaret.leibovic) → review+
(In reply to :Margaret Leibovic from comment #2) > Bug 1225842 was verified, how is it even possible that this worked? The whole expression was always true and we'd always call sendOpenSearchMessage() if no other previous expression was true. sendOpenSearchMessage() did some more checks (type == "application/opensearchdescription+xml") and so this kind of worked. I only noticed because I added another check at the end and was wondering why it was never evaluated.
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 50
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: