ext-bookmarks doesn't import PlacesUtils

RESOLVED FIXED in Firefox 50

Status

defect
P1
normal
RESOLVED FIXED
3 years ago
Last year

People

(Reporter: aswan, Assigned: aswan)

Tracking

({regression})

51 Branch
mozilla51
Points:
---

Firefox Tracking Flags

(firefox50 fixed, firefox51+ fixed)

Details

(Whiteboard: [bookmarks]triaged)

Attachments

(1 attachment)

+++ This bug was initially created as a clone of Bug #1292093 +++

User Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36

Steps to reproduce:

I'm porting my Chrome extension in Firefox. There is peace of code which don't works:

function loadHistory(callback) {
        chrome.history.search({
            text: "http",
            startTime: 1,
            maxResults: 10000000
        }, callback);
}

FF version: 51.0a1 (2016-08-03)


Actual results:

I got the exception in console: 

PlacesUtils is not defined ext-history.js:188
.history.search
chrome://browser/content/ext-history.js:188:1

callAsyncFunction
resource://gre/modules/Extension.jsm:557:61

bound callAsyncFunction
self-hostedinject/stubresource://gre/modules/Schemas.jsm:1181:16

loadHistory
.................................
The problem is in PlacesUtils. It is not defined.



Expected results:

I should get correct results in callback.
[Tracking Requested - why for this release]:
This is exactly the same issue as bug 1292093 but in the bookmarks api instead of history
https://bugzilla.mozilla.org/show_bug.cgi?id=1292093#c7
Whiteboard: [history]triaged → [bookmarks]triaged
Comment on attachment 8778340 [details]
Bug 1292605 Import PlacesUtils.jsm in ext-bookmarks

https://reviewboard.mozilla.org/r/69650/#review66780
Attachment #8778340 - Flags: review?(kmaglione+bmo) → review+
Pushed by maglione.k@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/c008ecf88273
Import PlacesUtils.jsm in ext-bookmarks r=kmag
Comment on attachment 8778340 [details]
Bug 1292605 Import PlacesUtils.jsm in ext-bookmarks

Approval Request Comment
[Feature/regressing bug #]: bug 1285063
[User impact if declined]: webextensions bookmarks api has the same flaw as described in bug 1292093
[Describe test coverage new/current, TreeHerder]: all existing tests pass with this change, the bug was so specific that a new targeted unit test for it would not be valuable for catching future regressions
[Risks and why]: low risk, just the webextensions bookmarks api implementation is affected
[String/UUID change made/needed]: none
Attachment #8778340 - Flags: approval-mozilla-aurora?
Tracking 51+ for this regression.
https://hg.mozilla.org/mozilla-central/rev/c008ecf88273
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla51
Keywords: regression
Comment on attachment 8778340 [details]
Bug 1292605 Import PlacesUtils.jsm in ext-bookmarks

Fixes a regression, Aurora50+
Attachment #8778340 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Severity: blocker → normal
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.