summaryrefslogtreecommitdiffstats
path: root/extensions/browser
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/browser')
-rw-r--r--extensions/browser/extension_protocols.cc14
1 files changed, 11 insertions, 3 deletions
diff --git a/extensions/browser/extension_protocols.cc b/extensions/browser/extension_protocols.cc
index 1fcabe1..2dbbf31 100644
--- a/extensions/browser/extension_protocols.cc
+++ b/extensions/browser/extension_protocols.cc
@@ -329,9 +329,17 @@ bool AllowExtensionResourceLoad(net::URLRequest* request,
// We have seen crashes where info is NULL: crbug.com/52374.
if (!info) {
- LOG(ERROR) << "Allowing load of " << request->url().spec()
- << "from unknown origin. Could not find user data for "
- << "request.";
+ // SeviceWorker net requests created through ServiceWorkerWriteToCacheJob
+ // do not have ResourceRequestInfo associated with them. So skip logging
+ // spurious errors below.
+ // TODO(falken): Either consider attaching ResourceRequestInfo to these or
+ // finish refactoring ServiceWorkerWriteToCacheJob so that it doesn't spawn
+ // a new URLRequest.
+ if (!ResourceRequestInfo::OriginatedFromServiceWorker(request)) {
+ LOG(ERROR) << "Allowing load of " << request->url().spec()
+ << "from unknown origin. Could not find user data for "
+ << "request.";
+ }
return true;
}