[SessionStorage] Save SessionStorageNamespaceImpl for re-use.
Since the tab restore code keeps a reference to the session namespaces of recently closed tabs (see sessions::ContentPlatformSpecificTabData and sessions::TabRestoreService), a SessionStorageNamespaceImpl can outlive the destruction of the browser window. A session restore can also happen without the browser context being shutdown or destroyed in between. This change keeps track of all 'alive' namespaces in a map. When a SessionStorageNamespaceImpl is created and there is an entry alive in that map, then that object is used instead. This allows the browser to re-use objects that are still alive thanks to the sessions component. Bug: 811189 Change-Id: I5c9e94ab4fe7b0017264c0f8f522d20134ea0c2b Reviewed-on: https://chromium-review.googlesource.com/930325 Commit-Queue: Daniel Murphy <dmurph@chromium.org> Reviewed-by:Marijn Kruisselbrink <mek@chromium.org> Cr-Commit-Position: refs/heads/master@{#539304}
Showing
Please register or sign in to comment