Closed
Bug 1280357
Opened 9 years ago
Closed 9 years ago
Update browser.history.onVisited to not call PlacesUtils.promisePlaceInfo
Categories
(WebExtensions :: Untriaged, defect, P1)
WebExtensions
Untriaged
Tracking
(firefox50 fixed)
Tracking | Status | |
---|---|---|
firefox50 | --- | fixed |
People
(Reporter: bsilverberg, Assigned: bsilverberg)
References
Details
(Whiteboard: [history]triaged)
Attachments
(1 file, 1 obsolete file)
It was suggested that it is too expensive/degrading of performance to call PlacesUtils.promisePlaceInfo for every visit, so the code in the observer should be changed to not call PlacesUtils.promisePlaceInfo but rather attempt to wait for a notification of `onTitleChanged` and use the title from that to provide data for onVisited.
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → bob.silverberg
Status: NEW → ASSIGNED
Iteration: --- → 50.1
Priority: -- → P1
Assignee | ||
Updated•9 years ago
|
Whiteboard: [history]triaged
Comment 1•9 years ago
|
||
Waiting for `onTitleChanged` is not helpful. Chrome does not provide the title in cases where it isn't already known, so we shouldn't either.
Assignee | ||
Comment 2•9 years ago
|
||
That's true. So we should still track titles of known pages via onTitleChanged, and then use those values if they are known when onVisit fires?
Assignee | ||
Comment 3•9 years ago
|
||
Removing the call to PlacesUtils.promisePlaceInfo and just returning an empty title.
Review commit: https://reviewboard.mozilla.org/r/59486/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/59486/
Attachment #8763188 -
Flags: review?(aswan)
Comment 4•9 years ago
|
||
Let's leave this as-is until we decide what we're going to do next. We just need to make sure to deal with it before the next merge.
Assignee | ||
Comment 5•9 years ago
|
||
Updated•9 years ago
|
Attachment #8763188 -
Flags: review?(aswan) → review+
Comment 6•9 years ago
|
||
Comment on attachment 8763188 [details]
Bug 1280357 - Update browser.history.onVisited to not call PlacesUtils.promisePlaceInfo,
https://reviewboard.mozilla.org/r/59486/#review56564
::: browser/components/extensions/ext-history.js:105
(Diff revision 1)
> onVisit: function(uri, visitId, time, sessionId, referringId, transitionType, guid, hidden, visitCount, typed) {
> - PlacesUtils.promisePlaceInfo(guid).then(placeInfo => {
> - let data = {
> + let data = {
> - id: guid,
> + id: guid,
> - url: uri.spec,
> + url: uri.spec,
> - title: placeInfo.title,
> + title: "",
Chrome documents title as an optional property, why don't we just omit it here?
Assignee | ||
Comment 7•9 years ago
|
||
Comment on attachment 8763188 [details]
Bug 1280357 - Update browser.history.onVisited to not call PlacesUtils.promisePlaceInfo,
We're going to approach this differently.
Attachment #8763188 -
Attachment is obsolete: true
Assignee | ||
Comment 8•9 years ago
|
||
Kris, I'm only here for the next few days, and then off until Aug. 8th. We said that we didn't want this code to make it into 50, so here are some suggestions:
1. I can just add back in a patch which removes the call to promisePlaceInfo and returns "" for the title, and then we can fix the title issue after bug 1280601 lands.
2. If you can land bug 1280601 in the next couple of days I can update this to use the title from the event.
3. I can do nothing and leave it in your hands to both land bug 1280601 and update this code before the merge.
I think 1 is safest, and least demanding of your time, right now, but let me know what you think we should do.
Flags: needinfo?(kmaglione+bmo)
Assignee | ||
Comment 9•9 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/65332/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/65332/
Attachment #8772575 -
Flags: review?(kmaglione+bmo)
Assignee | ||
Comment 10•9 years ago
|
||
Try run at https://treeherder.mozilla.org/#/jobs?repo=try&revision=6214a17a0e43 looks good.
Comment 11•9 years ago
|
||
Comment on attachment 8772575 [details]
Bug 1280357 - Update browser.history.onVisited to not call PlacesUtils.promisePlaceInfo,
https://reviewboard.mozilla.org/r/65332/#review62648
Attachment #8772575 -
Flags: review?(kmaglione+bmo) → review+
Assignee | ||
Comment 12•9 years ago
|
||
Thanks Kris.
Flags: needinfo?(kmaglione+bmo)
Keywords: checkin-needed
Comment 13•9 years ago
|
||
Pushed by cbook@mozilla.com:
https://hg.mozilla.org/integration/fx-team/rev/17409ee90c86
Update browser.history.onVisited to not call PlacesUtils.promisePlaceInfo, r=kmag
Keywords: checkin-needed
Comment 14•9 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status-firefox50:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla50
Updated•7 years ago
|
Product: Toolkit → WebExtensions
You need to log in
before you can comment on or make changes to this bug.
Description
•