ServiceWorker: call StopWorker when the network service crashes

This CL is to stop service workers when the network service crashes. This might
drop inflight events, but given that the frequency is quite
low, it's acceptable. When another event is dispatched to the service worker, it
starts the worker again and it should work.

Bug: 884007
Change-Id: I2da4bd05c6a89f70b623da8e29a89488fd5a9cf3
Reviewed-on: https://chromium-review.googlesource.com/1235593
Commit-Queue: Makoto Shimazu <[email protected]>
Reviewed-by: Matt Falkenhagen <[email protected]>
Reviewed-by: Kinuko Yasuda <[email protected]>
Cr-Commit-Position: refs/heads/master@{#593150}
diff --git a/content/browser/network_service_restart_browsertest.cc b/content/browser/network_service_restart_browsertest.cc
index 1eefed3..f34bc58 100644
--- a/content/browser/network_service_restart_browsertest.cc
+++ b/content/browser/network_service_restart_browsertest.cc
@@ -625,11 +625,7 @@
 }
 
 // Make sure fetch from service worker context works after crash.
-//
-// Disabled since service workers don't support recovery from a NS crash:
-// https://crbug.com/884007.
-IN_PROC_BROWSER_TEST_F(NetworkServiceRestartBrowserTest,
-                       DISABLED_ServiceWorkerFetch) {
+IN_PROC_BROWSER_TEST_F(NetworkServiceRestartBrowserTest, ServiceWorkerFetch) {
   StoragePartitionImpl* partition = static_cast<StoragePartitionImpl*>(
       BrowserContext::GetDefaultStoragePartition(browser_context()));
   ServiceWorkerStatusObserver observer;