| Index: third_party/WebKit/Source/core/workers/InProcessWorkerObjectProxy.cpp
|
| diff --git a/third_party/WebKit/Source/core/workers/InProcessWorkerObjectProxy.cpp b/third_party/WebKit/Source/core/workers/InProcessWorkerObjectProxy.cpp
|
| index fffaf55c94f4f9a1c7765a948ad30b20d51e8490..8e39e397d6aab263046adc1bbe5039e85b368e33 100644
|
| --- a/third_party/WebKit/Source/core/workers/InProcessWorkerObjectProxy.cpp
|
| +++ b/third_party/WebKit/Source/core/workers/InProcessWorkerObjectProxy.cpp
|
| @@ -129,6 +129,7 @@ void InProcessWorkerObjectProxy::DidCreateWorkerGlobalScope(
|
| timer_ = WTF::MakeUnique<TaskRunnerTimer<InProcessWorkerObjectProxy>>(
|
| TaskRunnerHelper::Get(TaskType::kUnthrottled, global_scope), this,
|
| &InProcessWorkerObjectProxy::CheckPendingActivity);
|
| + was_initialized_ = true;
|
| }
|
|
|
| void InProcessWorkerObjectProxy::DidEvaluateWorkerScript(bool) {
|
| @@ -138,6 +139,7 @@ void InProcessWorkerObjectProxy::DidEvaluateWorkerScript(bool) {
|
| void InProcessWorkerObjectProxy::WillDestroyWorkerGlobalScope() {
|
| timer_.reset();
|
| worker_global_scope_ = nullptr;
|
| + was_destroyed_ = true;
|
| }
|
|
|
| InProcessWorkerObjectProxy::InProcessWorkerObjectProxy(
|
| @@ -150,6 +152,10 @@ InProcessWorkerObjectProxy::InProcessWorkerObjectProxy(
|
| max_interval_in_sec_(kMaxIntervalInSec) {}
|
|
|
| void InProcessWorkerObjectProxy::StartPendingActivityTimer() {
|
| + // TODO(nhiroki): Remove these checks after https://crbug.com/713914 is fixed.
|
| + CHECK(was_initialized_);
|
| + CHECK(!was_destroyed_);
|
| + CHECK(timer_);
|
| if (timer_->IsActive()) {
|
| // Reset the next interval duration to check new activity state timely.
|
| // For example, a long-running activity can be cancelled by a message
|
|
|