Browse Source

fix: resolve crash loading file based serviceworkers (#20132)

John Kleinschmidt 5 years ago
parent
commit
7be1905023
2 changed files with 2 additions and 3 deletions
  1. 1 1
      shell/browser/net/proxying_url_loader_factory.cc
  2. 1 2
      spec/chromium-spec.js

+ 1 - 1
shell/browser/net/proxying_url_loader_factory.cc

@@ -695,7 +695,7 @@ void ProxyingURLLoaderFactory::CreateLoaderAndStart(
   // Intercept file:// protocol to support asar archives.
   if (request.url.SchemeIsFile()) {
     asar::CreateAsarURLLoader(request, std::move(loader), std::move(client),
-                              nullptr);
+                              new net::HttpResponseHeaders(""));
     return;
   }
 

+ 1 - 2
spec/chromium-spec.js

@@ -194,8 +194,7 @@ describe('chromium feature', () => {
     })
   })
 
-  // FIXME(robo/nornagon): re-enable these once service workers work
-  describe.skip('navigator.serviceWorker', () => {
+  describe('navigator.serviceWorker', () => {
     it('should register for file scheme', (done) => {
       w = new BrowserWindow({
         show: false,