Index: content/browser/service_worker/service_worker_url_request_job.cc |
diff --git a/content/browser/service_worker/service_worker_url_request_job.cc b/content/browser/service_worker/service_worker_url_request_job.cc |
index 44762fa1bce98e20d99e9da1c616c5d6f41af796..3a2dee5cb93e2c05868e019af17d51e54d031639 100644 |
--- a/content/browser/service_worker/service_worker_url_request_job.cc |
+++ b/content/browser/service_worker/service_worker_url_request_job.cc |
@@ -83,6 +83,10 @@ void ServiceWorkerURLRequestJob::Start() { |
void ServiceWorkerURLRequestJob::Kill() { |
net::URLRequestJob::Kill(); |
+ if (stream_ || !waiting_stream_url_.is_empty()) { |
+ if (ServiceWorkerVersion* active_version = provider_host_->active_version()) |
michaeln
2015/01/07 21:48:46
couple of things i wonder about?
provider_host_ i
horo
2015/01/08 04:04:02
ServiceWorkerURLRequestJob::Kill() must be called
|
+ active_version->RemoveStreamingURLRequestJob(this); |
+ } |
if (stream_) { |
stream_->RemoveReadObserver(this); |
stream_->Abort(); |
@@ -534,6 +538,8 @@ void ServiceWorkerURLRequestJob::DidDispatchFetchEvent( |
// Set up a request for reading the stream. |
if (response.stream_url.is_valid()) { |
DCHECK(response.blob_uuid.empty()); |
+ DCHECK(provider_host_->active_version()); |
+ provider_host_->active_version()->AddStreamingURLRequestJob(this); |
kinuko
2015/01/05 08:26:04
Should we just always keep alive the version while
horo
2015/01/05 08:31:32
We don't need to keep alive the version if Service
kinuko
2015/01/05 14:08:21
Ok. I just thought it might be simpler and ok enou
|
response_url_ = response.url; |
service_worker_response_type_ = response.response_type; |
CreateResponseHeader( |