Open Bug 1950469 Opened 28 days ago Updated 28 days ago

Fix race condition in AppUpdater

Categories

(Toolkit :: Application Update, defect)

defect

Tracking

()

People

(Reporter: bytesized, Unassigned)

References

Details

(Whiteboard: [fidedi-ope])

It is technically possible for update to change state within this span, which would cause #downloadUpdate to be called with no update, which causes an exception to be thrown.

Gah, I was going to quickly fix this, but I'm not actually fully sure what a good fix would be. We could put in an if (!this.#update) line, but what do we actually do in that case? That's not a valid update state to pair with DOWNLOADING, but it's really not AppUpdater's job to handle that. We could re-check the update state, as it may just be a different one now. But now what? We enter a loop of asynchronously checking and rechecking AUS in order to get an atomic set of values? That doesn't really seem good.

I think that this will be more reasonable to fix after I fix Bug 1900717, which I am hoping to do soon. So I'm going to leave this for now, unfortunately.

Assignee: bytesized → nobody
Whiteboard: [fidedi-ope]
You need to log in before you can comment on or make changes to this bug.