service worker: Don't crash when UI thread is shutdown.

In some tests, the DevToolsProxy can destruct after the UI thread shuts
down, so PostTaskWithTraits crashes. Use a TaskRunner instead, which
safely does nothing in that case.

Bug: 963702
Change-Id: I46a1647a9cfddd25ca0354fc95d4cbc4b43211a2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1624074
Reviewed-by: Alex Clarke <alexclarke@chromium.org>
Commit-Queue: Matt Falkenhagen <falken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#662120}
1 file changed