Our SWURLLoaderJob and SWSubresourceLoader classes are reading a blob via a URLLoader, but it can just use the MojoBlob Read() method. This will simplify code and fix a bug caused by trying to 'POST' to the URLLoader.
I have a WIP here but needs unit test fixing and better refactoring of the "BlobCompleteCaller" class: https://chromium-review.googlesource.com/c/chromium/src/+/822019
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/1e4e770ec53ab865cc8a0e85d9894f056cf8cc30 commit 1e4e770ec53ab865cc8a0e85d9894f056cf8cc30 Author: Daniel Murphy <dmurph@chromium.org> Date: Mon Dec 18 09:26:15 2017 S13nServiceWorker: Use MojoBlob directly. Adapted from falken@'s patch here: https://chromium-review.googlesource.com/c/chromium/src/+/822019 Bug: 794104 , 732750 Cq-Include-Trybots: master.tryserver.chromium.linux:linux_mojo Change-Id: If3e05ec30abb929794451c0fac7d141f416ebd2a Reviewed-on: https://chromium-review.googlesource.com/823374 Commit-Queue: Daniel Murphy <dmurph@chromium.org> Reviewed-by: Matt Falkenhagen <falken@chromium.org> Reviewed-by: Kinuko Yasuda <kinuko@chromium.org> Cr-Commit-Position: refs/heads/master@{#524666} [modify] https://crrev.com/1e4e770ec53ab865cc8a0e85d9894f056cf8cc30/content/browser/service_worker/service_worker_controllee_request_handler.cc [modify] https://crrev.com/1e4e770ec53ab865cc8a0e85d9894f056cf8cc30/content/browser/service_worker/service_worker_url_loader_job.cc [modify] https://crrev.com/1e4e770ec53ab865cc8a0e85d9894f056cf8cc30/content/browser/service_worker/service_worker_url_loader_job.h [modify] https://crrev.com/1e4e770ec53ab865cc8a0e85d9894f056cf8cc30/content/browser/service_worker/service_worker_url_loader_job_unittest.cc [modify] https://crrev.com/1e4e770ec53ab865cc8a0e85d9894f056cf8cc30/content/common/service_worker/service_worker_loader_helpers.cc [modify] https://crrev.com/1e4e770ec53ab865cc8a0e85d9894f056cf8cc30/content/common/service_worker/service_worker_loader_helpers.h [modify] https://crrev.com/1e4e770ec53ab865cc8a0e85d9894f056cf8cc30/content/common/service_worker/service_worker_utils.cc [modify] https://crrev.com/1e4e770ec53ab865cc8a0e85d9894f056cf8cc30/content/common/service_worker/service_worker_utils.h [modify] https://crrev.com/1e4e770ec53ab865cc8a0e85d9894f056cf8cc30/content/renderer/service_worker/service_worker_provider_context.cc [modify] https://crrev.com/1e4e770ec53ab865cc8a0e85d9894f056cf8cc30/content/renderer/service_worker/service_worker_subresource_loader.cc [modify] https://crrev.com/1e4e770ec53ab865cc8a0e85d9894f056cf8cc30/content/renderer/service_worker/service_worker_subresource_loader.h [modify] https://crrev.com/1e4e770ec53ab865cc8a0e85d9894f056cf8cc30/content/renderer/service_worker/service_worker_subresource_loader_unittest.cc [modify] https://crrev.com/1e4e770ec53ab865cc8a0e85d9894f056cf8cc30/content/renderer/service_worker/worker_fetch_context_impl.cc [modify] https://crrev.com/1e4e770ec53ab865cc8a0e85d9894f056cf8cc30/testing/buildbot/filters/mojo.fyi.network_content_browsertests.filter [modify] https://crrev.com/1e4e770ec53ab865cc8a0e85d9894f056cf8cc30/third_party/WebKit/LayoutTests/FlagExpectations/enable-features=NetworkService
I think we're done here. Thanks dmurph!
Comment 1 by falken@chromium.org
, Dec 12 2017