DescriptionServiceWorker: Get registration info and its version attributes in one lock operation
Registration info and its version attributes owned by SWProviderContext can be
accessed from both the main thread and the worker thread, so they are protected
by a lock operation. However, getter functions for those info and attributes are
separated and returned values could be in an invalid state due to interleaved
operations.
This CL merges getter functions (registration() and GetVersionAttributes()) into
GetRegistrationInfoAndVersionAttributes() and avoids such an unexpected state.
BUG=437677
TEST=should pass all existing tests
Committed: https://crrev.com/0b705112ae022e84c89e4f71b4ea6c75835e0d30
Cr-Commit-Position: refs/heads/master@{#313470}
Patch Set 1 : #
Total comments: 4
Patch Set 2 : address review comments #
Messages
Total messages: 13 (6 generated)
|