ServiceWorker: 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 Review URL: https://codereview.chromium.org/885443006 Cr-Commit-Position: refs/heads/master@{#313470}
Showing
Please register or sign in to comment