diff options
author | michaeln@google.com <michaeln@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-06-10 17:10:26 +0000 |
---|---|---|
committer | michaeln@google.com <michaeln@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-06-10 17:10:26 +0000 |
commit | 785abdc96b90b3893e00ead543b31bfbcc06ca34 (patch) | |
tree | 58a70255a26fc7f271713191a1f99fe9816e0e5a /content/browser/renderer_host/render_process_host_impl.h | |
parent | fda48c0a2ba6048b5877d8aed72b9de6caf7e3d4 (diff) | |
download | chromium_src-785abdc96b90b3893e00ead543b31bfbcc06ca34.zip chromium_src-785abdc96b90b3893e00ead543b31bfbcc06ca34.tar.gz chromium_src-785abdc96b90b3893e00ead543b31bfbcc06ca34.tar.bz2 |
Merge 275383 "When deleting a WebContents, keep SessionStorageNa..."
> When deleting a WebContents, keep SessionStorageNamespaces used in the tab alive until we receive an acknowledgment from the renderer that the renderer side constructs have been cleaned up. Otherwise we can receive messages from still executing content referring to sessions that were prematurely deleted.
>
> BUG=371304
>
> Review URL: https://codereview.chromium.org/305103003
TBR=michaeln@chromium.org
Review URL: https://codereview.chromium.org/327763003
git-svn-id: svn://svn.chromium.org/chrome/branches/1985/src@276058 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/renderer_host/render_process_host_impl.h')
-rw-r--r-- | content/browser/renderer_host/render_process_host_impl.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/content/browser/renderer_host/render_process_host_impl.h b/content/browser/renderer_host/render_process_host_impl.h index 358109f..03903ae 100644 --- a/content/browser/renderer_host/render_process_host_impl.h +++ b/content/browser/renderer_host/render_process_host_impl.h @@ -14,6 +14,7 @@ #include "base/process/process.h" #include "base/timer/timer.h" #include "content/browser/child_process_launcher.h" +#include "content/browser/dom_storage/session_storage_namespace_impl.h" #include "content/browser/geolocation/geolocation_dispatcher_host.h" #include "content/browser/power_monitor_message_broadcaster.h" #include "content/common/content_export.h" @@ -176,6 +177,14 @@ class CONTENT_EXPORT RenderProcessHostImpl scoped_refptr<ScreenOrientationDispatcherHost> screen_orientation_dispatcher_host() const; + // Used to extend the lifetime of the sessions until the render view + // in the renderer is fully closed. This is static because its also called + // with mock hosts as input in test cases. + static void ReleaseOnCloseACK( + RenderProcessHost* host, + const SessionStorageNamespaceMap& sessions, + int view_route_id); + // Register/unregister the host identified by the host id in the global host // list. static void RegisterHost(int host_id, RenderProcessHost* host); @@ -286,6 +295,7 @@ class CONTENT_EXPORT RenderProcessHostImpl void SuddenTerminationChanged(bool enabled); void OnUserMetricsRecordAction(const std::string& action); void OnSavedPageAsMHTML(int job_id, int64 mhtml_file_size); + void OnCloseACK(int old_route_id); // CompositorSurfaceBuffersSwapped handler when there's no RWH. void OnCompositorSurfaceBuffersSwappedNoHost( |