From 5b04bec4148bfdb8b70aa1d227be91b67e6f368a Mon Sep 17 00:00:00 2001 From: jochen Date: Wed, 17 Feb 2016 13:22:17 -0800 Subject: Invalidate all extensions contexts on shutdown BUG=584716 R=rdevlin.cronin@chromium.org,yzshen@chromium.org Review URL: https://codereview.chromium.org/1702863004 Cr-Commit-Position: refs/heads/master@{#375983} --- extensions/renderer/dispatcher.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'extensions/renderer') diff --git a/extensions/renderer/dispatcher.cc b/extensions/renderer/dispatcher.cc index 2c6ad7d..c3718d9 100644 --- a/extensions/renderer/dispatcher.cc +++ b/extensions/renderer/dispatcher.cc @@ -953,6 +953,10 @@ void Dispatcher::OnRenderProcessShutdown() { v8_schema_registry_.reset(); forced_idle_timer_.reset(); content_watcher_.reset(); + script_context_set_->ForEach( + std::string(), nullptr, + base::Bind(&ScriptContextSet::Remove, + base::Unretained(script_context_set_.get()))); } void Dispatcher::OnActivateExtension(const std::string& extension_id) { -- cgit v1.1