Closed Bug 1414997 Opened 7 years ago Closed 7 years ago

ExtensionStorageSync might initialize Kinto multiple times

Categories

(WebExtensions :: General, enhancement)

enhancement
Not set
normal

Tracking

(firefox58 fixed)

RESOLVED FIXED
mozilla58
Tracking Status
firefox58 --- fixed

People

(Reporter: tcsc, Assigned: tcsc)

Details

Attachments

(1 file)

This function does an await before setting the value it's waiting for, so if you called it twice in a row it would initialize twice. http://searchfox.org/mozilla-central/source/toolkit/components/extensions/ExtensionStorageSync.jsm#339 It's called transitively from functions called by webextensions, so this can happen in practice, and has been reported in IRC.
I don't like not having any insight into the extension-storage sync engine, and since I'm the reporter, I wrote a patch for this.
Assignee: nobody → tchiovoloni
For what it's worth, while the attached test fails without the patch (and it fails rather hard), bug 1415012 is the actual issue the reporter in IRC was experiencing (it wasn't multiple instances of Kinto, it was just that everything was starting a new sync as soon as the previous finished).
Comment on attachment 8925744 [details] Bug 1414997 - Ensure extension storage sync initializes Kinto exactly once https://reviewboard.mozilla.org/r/196890/#review202284
Attachment #8925744 - Flags: review?(eglassercamp) → review+
Pushed by tchiovoloni@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/ea8ee7aee5b8 Ensure extension storage sync initializes Kinto exactly once r=glasserc
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
Is manual testing required on this bug? If Yes, please provide some STR and the proper webextension(if required), if No set the “qe-verify-“ flag.
Flags: needinfo?(tchiovoloni)
No, the automated testing is sufficient, and no extension has hit this yet (AFAIK). Thanks!
Flags: needinfo?(tchiovoloni) → qe-verify-
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: