Index: content/test/weburl_loader_mock_factory.cc |
diff --git a/content/test/weburl_loader_mock_factory.cc b/content/test/weburl_loader_mock_factory.cc |
index 64bdea1b8824afe31a2e7a9dd135247dd2b66ade..b6fd18a88c3bb4b946b423af578599e45a28d4f0 100644 |
--- a/content/test/weburl_loader_mock_factory.cc |
+++ b/content/test/weburl_loader_mock_factory.cc |
@@ -109,7 +109,8 @@ bool WebURLLoaderMockFactory::IsMockedURL(const blink::WebURL& url) { |
void WebURLLoaderMockFactory::CancelLoad(WebURLLoaderMock* loader) { |
LoaderToRequestMap::iterator iter = pending_loaders_.find(loader); |
dcheng
2015/08/26 15:38:18
How about just replacing the entire body with pend
esprehn
2015/08/26 16:01:40
Done.
|
- DCHECK(iter != pending_loaders_.end()); |
+ if (iter == pending_loaders_.end()) |
+ return; |
pending_loaders_.erase(iter); |
} |
@@ -166,6 +167,9 @@ bool WebURLLoaderMockFactory::IsPending(WebURLLoaderMock* loader) { |
// static |
bool WebURLLoaderMockFactory::ReadFile(const base::FilePath& file_path, |
WebData* data) { |
+ if (file_path.empty()) |
+ return true; |
+ |
int64 file_size = 0; |
if (!base::GetFileSize(file_path, &file_size)) |
return false; |