ext-bookmarks doesn't import PlacesUtils

RESOLVED FIXED in Firefox 50

Status

WebExtensions
Untriaged
P1
normal
RESOLVED FIXED
2 years ago
5 days ago

People

(Reporter: aswan, Assigned: aswan)

Tracking

({regression})

51 Branch
mozilla51
regression

Firefox Tracking Flags

(firefox50 fixed, firefox51+ fixed)

Details

(Whiteboard: [bookmarks]triaged)

MozReview Requests

Submitter Diff Changes Open Issues Last Updated
Loading...
Error loading review requests:

Attachments

(1 attachment)

(Assignee)

Description

2 years ago
+++ 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.
(Assignee)

Comment 1

2 years ago
[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
status-firefox50: --- → affected
tracking-firefox51: --- → ?
Whiteboard: [history]triaged → [bookmarks]triaged
(Assignee)

Comment 2

2 years ago
Created attachment 8778340 [details]
Bug 1292605 Import PlacesUtils.jsm in ext-bookmarks

Review commit: https://reviewboard.mozilla.org/r/69650/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/69650/
Attachment #8778340 - Flags: review?(kmaglione+bmo)
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+

Comment 4

2 years ago
Pushed by maglione.k@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/c008ecf88273
Import PlacesUtils.jsm in ext-bookmarks r=kmag
(Assignee)

Comment 5

2 years ago
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.
tracking-firefox51: ? → +

Comment 7

2 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/c008ecf88273
Status: NEW → RESOLVED
Last Resolved: 2 years ago
status-firefox51: affected → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla51

Updated

2 years ago
Keywords: regression

Comment 8

2 years ago
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+

Comment 9

2 years ago
bugherderuplift
https://hg.mozilla.org/releases/mozilla-aurora/rev/a58a1fc61ecf
status-firefox50: affected → fixed

Updated

2 years ago
Severity: blocker → normal

Updated

5 days ago
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.