DescriptionChrome Now notificationGroups Storage Race Condition Fix
Updating cards involves updating the notificationGroups in rapid succession,
leading to race conditions between storage.get and storage.set. The queued
up storage.gets may dispatch all at once before each storage.set, meaning that
the storage.set will set stale values.
In other words, we get
storage.get
storage.get
storage.set
storage.set
instead of
storage.get
storage.set
storage.get
storage.set
The fix here is to move the requests outside of the for loop, adding
arguments to functions where necessary to work around this gotcha.
BUG=164227
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=240798
Patch Set 1 #
Total comments: 9
Patch Set 2 : CR Feedback #
Total comments: 4
Patch Set 3 : CR Feedback #
Messages
Total messages: 10 (0 generated)
|