diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-10-12 14:27:29 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-10-13 09:35:20 +0000 |
commit | c30a6232df03e1efbd9f3b226777b07e087a1122 (patch) | |
tree | e992f45784689f373bcc38d1b79a239ebe17ee23 /chromium/content/browser/appcache/appcache_host.cc | |
parent | 7b5b123ac58f58ffde0f4f6e488bcd09aa4decd3 (diff) | |
download | qtwebengine-chromium-85-based.tar.gz |
BASELINE: Update Chromium to 85.0.4183.14085-based
Change-Id: Iaa42f4680837c57725b1344f108c0196741f6057
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/content/browser/appcache/appcache_host.cc')
-rw-r--r-- | chromium/content/browser/appcache/appcache_host.cc | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/chromium/content/browser/appcache/appcache_host.cc b/chromium/content/browser/appcache/appcache_host.cc index 4268404fba4..91d1cc04c0d 100644 --- a/chromium/content/browser/appcache/appcache_host.cc +++ b/chromium/content/browser/appcache/appcache_host.cc @@ -8,6 +8,7 @@ #include <vector> #include "base/check_op.h" +#include "base/debug/dump_without_crashing.h" #include "base/memory/ptr_util.h" #include "base/strings/string_util.h" #include "base/strings/stringprintf.h" @@ -20,6 +21,7 @@ #include "content/browser/child_process_security_policy_impl.h" #include "content/browser/web_contents/web_contents_impl.h" #include "content/common/appcache_interfaces.h" +#include "content/public/browser/browser_thread.h" #include "content/public/common/content_client.h" #include "content/public/common/url_constants.h" #include "net/url_request/url_request.h" @@ -82,10 +84,12 @@ AppCacheHost::AppCacheHost( const base::UnguessableToken& host_id, int process_id, int render_frame_id, + SecurityPolicyHandle security_policy_handle, mojo::PendingRemote<blink::mojom::AppCacheFrontend> frontend_remote, AppCacheServiceImpl* service) : host_id_(host_id), process_id_(process_id), + security_policy_handle_(std::move(security_policy_handle)), pending_main_resource_cache_id_(blink::mojom::kAppCacheNoCacheId), pending_selected_cache_id_(blink::mojom::kAppCacheNoCacheId), was_select_cache_called_(false), @@ -99,10 +103,9 @@ AppCacheHost::AppCacheHost( main_resource_blocked_(false), associated_cache_info_pending_(false) { service_->AddObserver(this); - if (process_id_ != ChildProcessHost::kInvalidUniqueID) { - security_policy_handle_ = - ChildProcessSecurityPolicyImpl::GetInstance()->CreateHandle( - process_id_); + if (process_id_ != ChildProcessHost::kInvalidUniqueID && + !security_policy_handle_.is_valid()) { + base::debug::DumpWithoutCrashing(); } is_origin_trial_required_ = service_->appcache_policy()->IsOriginTrialRequiredForAppCache(); @@ -633,6 +636,8 @@ void AppCacheHost::SetProcessId(int process_id) { process_id_ = process_id; security_policy_handle_ = ChildProcessSecurityPolicyImpl::GetInstance()->CreateHandle(process_id_); + if (!security_policy_handle_.is_valid()) + base::debug::DumpWithoutCrashing(); } base::WeakPtr<AppCacheHost> AppCacheHost::GetWeakPtr() { @@ -728,8 +733,8 @@ void AppCacheHost::OnAppCacheAccessed(const GURL& manifest_url, bool blocked) { // informing WebContents about this access. if (render_frame_id_ != MSG_ROUTING_NONE && BrowserThread::IsThreadInitialized(BrowserThread::UI)) { - base::PostTask( - FROM_HERE, {BrowserThread::UI}, + GetUIThreadTaskRunner({})->PostTask( + FROM_HERE, base::BindOnce( [](int process_id, int render_frame_id, const GURL& manifest_url, bool blocked) { |