Closed
Bug 1295301
Opened 8 years ago
Closed 8 years ago
history.onVisitRemoved argument is wrong after a call to history.deleteAll
Categories
(WebExtensions :: Untriaged, defect, P1)
WebExtensions
Untriaged
Tracking
(firefox50 fixed, firefox51 verified)
People
(Reporter: wbamberg, Assigned: bsilverberg)
Details
(Whiteboard: [history]triaged)
Attachments
(1 file)
58 bytes,
text/x-review-board-request
|
aswan
:
review+
ritu
:
approval-mozilla-aurora+
|
Details |
If you add a listener to chrome.history.onVisitRemoved, it's passed a callback object containing a boolean `allHistory` and an array `urls`. If the event fired because the history was all cleared, `allHistory` is true and `urls` should be an empty array (according to the Chrome docs[1] and Chrome behavior). In Firefox, though, `urls` is undefined in this situation. [1] https://developer.chrome.com/extensions/history#event-onVisitRemoved (although now I see that `urls` is also marked as optional, which makes no sense to me).
Assignee | ||
Comment 1•8 years ago
|
||
I think I implemented it this way precisely because `urls` is defined as optional. However, the comment in the Chrome docs about `allHistory`: "True if all history was removed. If true, then urls will be empty.", plus the fact that Chrome does in fact return an empty array, suggests that this is a bug that should be fixed. I will change the `urls` property to not be optional and will return an empty array, as per Chrome.
Assignee: nobody → bob.silverberg
Status: NEW → ASSIGNED
Iteration: --- → 51.2 - Aug 29
Priority: -- → P1
Whiteboard: [history]triaged
Comment hidden (mozreview-request) |
Comment 3•8 years ago
|
||
mozreview-review |
Comment on attachment 8781549 [details] Bug 1295301 - history.onVisitRemoved argument is wrong after a call to history.deleteAll, https://reviewboard.mozilla.org/r/71966/#review69606
Attachment #8781549 -
Flags: review?(aswan) → review+
Assignee | ||
Comment 4•8 years ago
|
||
Thanks Andrew. Try run is looking good as well.
Keywords: checkin-needed
Pushed by ryanvm@gmail.com: https://hg.mozilla.org/integration/autoland/rev/366b3ac46777 history.onVisitRemoved argument is wrong after a call to history.deleteAll, r=aswan
Keywords: checkin-needed
Comment 6•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/366b3ac46777
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
status-firefox51:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla51
Assignee | ||
Comment 7•8 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=ee1ae9033aa0
Assignee | ||
Comment 8•8 years ago
|
||
Comment on attachment 8781549 [details] Bug 1295301 - history.onVisitRemoved argument is wrong after a call to history.deleteAll, Approval Request Comment [Feature/regressing bug #]: 1295301 [User impact if declined]: There is an incompatibility between the initial implementation of this method and how it is implemented in Chrome. This fixes that incompatibility. [Describe test coverage new/current, TreeHerder]: This patch includes a test for this feature. A try run against Aurora has been submitted at https://treeherder.mozilla.org/#/jobs?repo=try&revision=8c212f31a55c [Risks and why]: This only affects the history API and is a very small change, therefore the risk is low. [String/UUID change made/needed]: None.
Attachment #8781549 -
Flags: approval-mozilla-aurora?
Hello Will, could you please verify this issue is fixed as expected on a latest Nightly build? Thanks!
Flags: needinfo?(wbamberg)
Comment on attachment 8781549 [details] Bug 1295301 - history.onVisitRemoved argument is wrong after a call to history.deleteAll, Patch improves browser parity, includes a new test (yay!), Aurora50+
Attachment #8781549 -
Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
status-firefox50:
--- → affected
Reporter | ||
Comment 11•8 years ago
|
||
(In reply to Ritu Kothari (:ritu) from comment #9) > Hello Will, could you please verify this issue is fixed as expected on a > latest Nightly build? Thanks! Yes! Verified as fixed on 51.0a1 (2016-08-22).
Flags: needinfo?(wbamberg)
Reporter | ||
Updated•8 years ago
|
Status: RESOLVED → VERIFIED
> Yes! Verified as fixed on 51.0a1 (2016-08-22).
Great Thanks!
Comment 13•8 years ago
|
||
bugherder uplift |
https://hg.mozilla.org/releases/mozilla-aurora/rev/35a1c9a9d263
Flags: in-testsuite+
Assignee | ||
Comment 14•8 years ago
|
||
Thanks Ryan.
Updated•6 years ago
|
Product: Toolkit → WebExtensions
You need to log in
before you can comment on or make changes to this bug.
Description
•