Commit 1bc384a5 authored by Patrick Monette's avatar Patrick Monette Committed by Commit Bot

[PM] Change DCHECKs into DumpWithoutCrashing in SWContextAdapter

The DCHECKs were added to generate crashes to help me solve a lifetime
issue with service worker controllees, but I underestimated how often
the issue happens and have had no crashes yet.

Changing them to DumpWithoutCrashing will make it so that anyone on
canary will be able to hit them.

This CL is meant to be reverted as soon as enough crashes are received
to debug the root issue.

Bug: 1086944, 1088353
Change-Id: I50904f30ba8d23a5e5661edf8f1cf4d341e6dfef
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2444370Reviewed-by: default avatarFrançois Doray <fdoray@chromium.org>
Commit-Queue: Patrick Monette <pmonette@chromium.org>
Cr-Commit-Position: refs/heads/master@{#813227}
parent dab3e405
......@@ -5,6 +5,7 @@
#include "components/performance_manager/service_worker_context_adapter.h"
#include "base/check_op.h"
#include "base/debug/dump_without_crashing.h"
#include "base/notreached.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/render_process_host_observer.h"
......@@ -276,7 +277,7 @@ void ServiceWorkerContextAdapter::OnControlleeAdded(
bool inserted =
service_worker_clients_[version_id].insert(client_uuid).second;
if (!inserted) {
NOTREACHED();
base::debug::DumpWithoutCrashing();
return;
}
......@@ -291,13 +292,13 @@ void ServiceWorkerContextAdapter::OnControlleeRemoved(
// notification is dropped.
auto it = service_worker_clients_.find(version_id);
if (it == service_worker_clients_.end()) {
NOTREACHED();
base::debug::DumpWithoutCrashing();
return;
}
size_t removed = it->second.erase(client_uuid);
if (!removed) {
NOTREACHED();
base::debug::DumpWithoutCrashing();
return;
}
......@@ -324,12 +325,12 @@ void ServiceWorkerContextAdapter::OnControlleeNavigationCommitted(
// not already a client of |version_id|.
auto it = service_worker_clients_.find(version_id);
if (it == service_worker_clients_.end()) {
NOTREACHED();
base::debug::DumpWithoutCrashing();
return;
}
if (it->second.find(client_uuid) == it->second.end()) {
NOTREACHED();
base::debug::DumpWithoutCrashing();
return;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment