Commit 019b6731 authored by Marijn Kruisselbrink's avatar Marijn Kruisselbrink Committed by Commit Bot

Don't crash when resolving blob URLs after context goes away.

After a PublicURLManager is "stopped" (i.e. the ExecutionContext it
belongs to has been destroyed) it is no longer possible to resolve
any URLs through it. So in that case, just early return from Resolve(),
just like Register and Revoke already do as well.

Bug: 931139
Change-Id: Ibd76833f10a1ffa40b712e93a5b5ef41071ebe99
Reviewed-on: https://chromium-review.googlesource.com/c/1495373Reviewed-by: default avatarDaniel Murphy <dmurph@chromium.org>
Commit-Queue: Marijn Kruisselbrink <mek@chromium.org>
Cr-Commit-Position: refs/heads/master@{#636531}
parent f39f128a
......@@ -167,6 +167,9 @@ void PublicURLManager::Revoke(const KURL& url) {
void PublicURLManager::Resolve(
const KURL& url,
network::mojom::blink::URLLoaderFactoryRequest factory_request) {
if (is_stopped_)
return;
DCHECK(BlobUtils::MojoBlobURLsEnabled());
DCHECK(url.ProtocolIs("blob"));
if (!url_store_) {
......@@ -179,6 +182,9 @@ void PublicURLManager::Resolve(
void PublicURLManager::Resolve(
const KURL& url,
mojom::blink::BlobURLTokenRequest token_request) {
if (is_stopped_)
return;
DCHECK(BlobUtils::MojoBlobURLsEnabled());
DCHECK(url.ProtocolIs("blob"));
if (!url_store_) {
......
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