bookmarks.search fails on non-http(s) URLs

NEW
Unassigned

Status

()

Toolkit
WebExtensions: General
P3
normal
2 months ago
a month ago

People

(Reporter: maxlath, Unassigned)

Tracking

52 Branch
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [bookmarks], triaged)

(Reporter)

Description

2 months ago
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0
Build ID: 20170317213149

Steps to reproduce:

I'm developping a WebExtension that calls bookmarks.search for the current tab URL. Works fine for http(s) URLs but fails for about: and file: URLs.


Actual results:

Thrown error: "Type error for parameter query (Value must either: be a string value, or .url must match the format "url") for bookmarks.search."


Expected results:

It should not throw an error and return the search result instead.

Updated

2 months ago
Component: Untriaged → WebExtensions: Untriaged
Product: Firefox → Toolkit

Updated

2 months ago
Flags: needinfo?(bob.silverberg)
Priority: -- → P3
Whiteboard: [bookmarks], triaged
I confirmed that this does work in Chrome with chrome:// and file:// URLs. Kris said it's something we might as well do, with the comment "Just add a flag to MatchPattern to allow it to match all protocols", although I'm not yet sure exactly what that means.

A current workaround, until someone fixes this bug, is to just use the basic string search, which will match the url field of the bookmark.
Status: UNCONFIRMED → NEW
Component: WebExtensions: Untriaged → WebExtensions: General
Ever confirmed: true
Flags: needinfo?(bob.silverberg)
You need to log in before you can comment on or make changes to this bug.