| Index: content/browser/service_worker/service_worker_handle.h
|
| diff --git a/content/browser/service_worker/service_worker_handle.h b/content/browser/service_worker/service_worker_handle.h
|
| index 2aa7cc026f93aa6d331fe86fc6b1969d75be4b29..81d5b3574a242c62534508c2b2ed0764a58b5516 100644
|
| --- a/content/browser/service_worker/service_worker_handle.h
|
| +++ b/content/browser/service_worker/service_worker_handle.h
|
| @@ -71,11 +71,16 @@ class CONTENT_EXPORT ServiceWorkerHandle
|
| ServiceWorkerVersion* version() { return version_.get(); }
|
| int handle_id() const { return handle_id_; }
|
|
|
| + bool HasNoRefCount() const { return ref_count_ <= 0; }
|
| + void IncrementRefCount();
|
| + void DecrementRefCount();
|
| +
|
| private:
|
| base::WeakPtr<ServiceWorkerContextCore> context_;
|
| IPC::Sender* sender_; // Not owned, it should always outlive this.
|
| const int thread_id_;
|
| const int handle_id_;
|
| + int ref_count_; // Created with 1.
|
| scoped_refptr<ServiceWorkerRegistration> registration_;
|
| scoped_refptr<ServiceWorkerVersion> version_;
|
|
|
|
|