Closed
Bug 1389717
Opened 6 years ago
Closed 6 years ago
Ensure `HistoryStore#changeItemID` waits for `fetchURLInfoForGuid`
Categories
(Firefox :: Sync, enhancement, P1)
Firefox
Sync
Tracking
()
RESOLVED
FIXED
Firefox 57
Tracking | Status | |
---|---|---|
firefox55 | --- | unaffected |
firefox56 | --- | wontfix |
firefox57 | --- | fixed |
People
(Reporter: lina, Assigned: lina)
References
Details
Attachments
(1 file)
I caught this looking over our `PlacesSyncUtils` calls. Property access binds tighter than `await`, so `await PlacesSyncUtils.history.fetchURLInfoForGuid(oldID).url` won't wait for `fetchURLInfoForGuid`.
Comment hidden (mozreview-request) |
Assignee | ||
Updated•6 years ago
|
Summary: Fix `await` operator precedence in `History#changeItemID` → Ensure `HistoryStore#changeItemID` waits for `fetchURLInfoForGuid`
Assignee | ||
Updated•6 years ago
|
Attachment #8896529 -
Flags: review?(markh) → review?(tchiovoloni)
Comment 2•6 years ago
|
||
mozreview-review |
Comment on attachment 8896529 [details] Bug 1389717 - Ensure `HistoryStore#changeItemID` waits for `fetchURLInfoForGuid`. https://reviewboard.mozilla.org/r/167794/#review172996 I don't think this function is called, but we should fix this either way. LGTM!
Attachment #8896529 -
Flags: review?(tchiovoloni) → review+
Comment 3•6 years ago
|
||
mozreview-review |
Comment on attachment 8896529 [details] Bug 1389717 - Ensure `HistoryStore#changeItemID` waits for `fetchURLInfoForGuid`. https://reviewboard.mozilla.org/r/167794/#review173008 ::: services/sync/modules/engines/history.js:163 (Diff revision 1) > }, > > async changeItemID(oldID, newID) { > - this.setGUID(await PlacesSyncUtils.history.fetchURLInfoForGuid(oldID).url, newID); > + let info = await PlacesSyncUtils.history.fetchURLInfoForGuid(oldID); > + if (info) { > + this.setGUID(info.url, newID); I don't really mind, but I wonder if it might be better to have the code implicitly throw when info is falsey rather than silently do nothing?
Attachment #8896529 -
Flags: review+
Comment hidden (mozreview-request) |
Pushed by kcambridge@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/9d419fafe04f Ensure `HistoryStore#changeItemID` waits for `fetchURLInfoForGuid`. r=markh,tcsc
Updated•6 years ago
|
Priority: -- → P1
Comment 6•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/9d419fafe04f
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 57
Assignee | ||
Comment 7•6 years ago
|
||
WONTFIXing for 56, since this function isn't ever called.
Assignee | ||
Updated•6 years ago
|
You need to log in
before you can comment on or make changes to this bug.
Description
•