Commit 5243467e authored by Makoto Shimazu's avatar Makoto Shimazu Committed by Commit Bot

Add more CHECKs to SWContextClient for debugging https://crbug.com/889567

I'm suspecting that CHECK(context_) will hit.

Bug: 889567
Change-Id: I1e839185dc86f33ed9d8da6fb93c0ecf63a3d2a5
Reviewed-on: https://chromium-review.googlesource.com/c/1288097
Commit-Queue: Makoto Shimazu <shimazu@chromium.org>
Reviewed-by: default avatarMatt Falkenhagen <falken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#600702}
parent ee829599
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
#include <memory> #include <memory>
#include <utility> #include <utility>
#include "base/debug/alias.h"
#include "base/feature_list.h" #include "base/feature_list.h"
#include "base/lazy_instance.h" #include "base/lazy_instance.h"
#include "base/logging.h" #include "base/logging.h"
...@@ -994,8 +995,17 @@ void ServiceWorkerContextClient::RespondToFetchEvent( ...@@ -994,8 +995,17 @@ void ServiceWorkerContextClient::RespondToFetchEvent(
TRACE_ID_WITH_SCOPE(kServiceWorkerContextClientScope, TRACE_ID_WITH_SCOPE(kServiceWorkerContextClientScope,
TRACE_ID_LOCAL(fetch_event_id)), TRACE_ID_LOCAL(fetch_event_id)),
TRACE_EVENT_FLAG_FLOW_IN | TRACE_EVENT_FLAG_FLOW_OUT); TRACE_EVENT_FLAG_FLOW_IN | TRACE_EVENT_FLAG_FLOW_OUT);
// Changed DCHECK to CHECK temporary: https://crbug.com/889567.
CHECK(base::ContainsKey(context_->fetch_response_callbacks, fetch_event_id)); // These CHECKs are for debugging: https://crbug.com/889567.
CHECK(context_);
if (!base::ContainsKey(context_->fetch_response_callbacks, fetch_event_id)) {
bool does_exist_fetch_event_callback =
base::ContainsKey(context_->fetch_event_callbacks, fetch_event_id);
base::debug::Alias(&does_exist_fetch_event_callback);
CHECK(false);
return;
}
blink::mojom::FetchAPIResponsePtr response( blink::mojom::FetchAPIResponsePtr response(
GetFetchAPIResponseFromWebResponse(web_response)); GetFetchAPIResponseFromWebResponse(web_response));
const blink::mojom::ServiceWorkerFetchResponseCallbackPtr& response_callback = const blink::mojom::ServiceWorkerFetchResponseCallbackPtr& response_callback =
......
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