1 Star 0 Fork 25

Jingwiw/chromium_oerv

forked from openEuler-RISC-V/chromium 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
chromium-87-ServiceWorkerContainerHost-crash.patch 1.08 KB
一键复制 编辑 原始数据 按行查看 历史
jeff200902 提交于 2021-01-22 16:42 . package init park1
Bug: https://bugs.gentoo.org/750038
Upstream bug: https://crbug.com/1135070
--- a/content/browser/service_worker/service_worker_container_host.cc
+++ b/content/browser/service_worker/service_worker_container_host.cc
@@ -626,6 +626,16 @@
int64_t registration_id) {
DCHECK_CURRENTLY_ON(ServiceWorkerContext::GetCoreThreadId());
DCHECK(base::Contains(registration_object_hosts_, registration_id));
+
+ // ServiceWorkerRegistrationObjectHost to be deleted may have the last reference to
+ // ServiceWorkerRegistration that indirectly owns this ServiceWorkerContainerHost.
+ // If we erase the object host directly from the map, |this| could be deleted
+ // during the map operation and may crash. To avoid the case, we take the
+ // ownership of the object host from the map first, and then erase the entry
+ // from the map. See https://crbug.com/1135070 for details.
+ std::unique_ptr<ServiceWorkerRegistrationObjectHost> to_be_deleted =
+ std::move(registration_object_hosts_[registration_id]);
+ DCHECK(to_be_deleted);
registration_object_hosts_.erase(registration_id);
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/Jingwiw/chromium_oerv.git
git@gitee.com:Jingwiw/chromium_oerv.git
Jingwiw
chromium_oerv
chromium_oerv
master

搜索帮助