Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(143)

Unified Diff: content/browser/frame_host/render_frame_host_impl.cc

Issue 2249173003: Removes the references to shared workers from the all documents in being deleted frames (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: incorporated nhiroki's comment Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/browser/shared_worker/shared_worker_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/frame_host/render_frame_host_impl.cc
diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc
index 1794aaa71fcb5af4caa22cb3e05cb35ac6285d80..3d599069201a7c95d5cfa1f3cb86af1ec4ddfb89 100644
--- a/content/browser/frame_host/render_frame_host_impl.cc
+++ b/content/browser/frame_host/render_frame_host_impl.cc
@@ -48,6 +48,7 @@
#include "content/browser/renderer_host/render_widget_host_delegate.h"
#include "content/browser/renderer_host/render_widget_host_impl.h"
#include "content/browser/renderer_host/render_widget_host_view_base.h"
+#include "content/browser/shared_worker/shared_worker_service_impl.h"
#include "content/browser/wake_lock/wake_lock_service_context.h"
#include "content/browser/websockets/websocket_manager.h"
#include "content/browser/webui/web_ui_controller_factory_registry.h"
@@ -180,6 +181,12 @@ void GrantFileAccess(int child_id,
}
}
+void NotifyRenderFrameDetachedOnIO(int render_process_id, int render_frame_id) {
+ DCHECK_CURRENTLY_ON(BrowserThread::IO);
+ SharedWorkerServiceImpl::GetInstance()->RenderFrameDetached(render_process_id,
+ render_frame_id);
+}
+
} // namespace
// static
@@ -310,6 +317,9 @@ RenderFrameHostImpl::~RenderFrameHostImpl() {
GetProcess()->RemoveRoute(routing_id_);
g_routing_id_frame_map.Get().erase(
RenderFrameHostID(GetProcess()->GetID(), routing_id_));
+ BrowserThread::PostTask(BrowserThread::IO, FROM_HERE,
+ base::Bind(&NotifyRenderFrameDetachedOnIO,
+ GetProcess()->GetID(), routing_id_));
site_instance_->RemoveObserver(this);
« no previous file with comments | « no previous file | content/browser/shared_worker/shared_worker_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698