Commit 3fb5b87b authored by Peter Beverloo's avatar Peter Beverloo Committed by Commit Bot

[Background Fetch] Post-submit review comments for 1155118

Change-Id: I9a2287102428a6c386fde09d9d237c6a9419e824
Reviewed-on: https://chromium-review.googlesource.com/1156589Reviewed-by: default avatarMugdha Lakhani <nator@chromium.org>
Commit-Queue: Peter Beverloo <peter@chromium.org>
Cr-Commit-Position: refs/heads/master@{#579865}
parent 86d4fd13
...@@ -220,8 +220,8 @@ void BackgroundFetchContext::AbandonFetches( ...@@ -220,8 +220,8 @@ void BackgroundFetchContext::AbandonFetches(
service_worker_registration_id) { service_worker_registration_id) {
DCHECK(saved_iter->second); DCHECK(saved_iter->second);
// TODO(peter): Temporary work-around for a crash where fetches for a // TODO(crbug.com/850512): Temporary work-around for a crash where fetches
// given Service Worker registration are abandoned twice. // for a given Service Worker registration are abandoned twice.
if (saved_iter->second->aborted()) if (saved_iter->second->aborted())
continue; continue;
......
...@@ -209,8 +209,9 @@ ScriptPromise BackgroundFetchManager::fetch( ...@@ -209,8 +209,9 @@ ScriptPromise BackgroundFetchManager::fetch(
"that URL is invalid"); "that URL is invalid");
} }
// 6.3.1.7.2: If |internalRequest|’s mode is "no-cors", then return a // https://wicg.github.io/background-fetch/#dom-backgroundfetchmanager-fetch
// promise rejected with a TypeError. // ""If |internalRequest|’s mode is "no-cors", then return a promise
// rejected with a TypeError.""
if (web_request.Mode() == network::mojom::FetchRequestMode::kNoCORS) { if (web_request.Mode() == network::mojom::FetchRequestMode::kNoCORS) {
return RejectWithTypeError(script_state, request_url, return RejectWithTypeError(script_state, request_url,
"the request mode must not be no-cors"); "the request mode must not be no-cors");
......
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