| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "modules/serviceworkers/ServiceWorkerRegistration.h" | 5 #include "modules/serviceworkers/ServiceWorkerRegistration.h" |
| 6 | 6 |
| 7 #include "bindings/core/v8/CallbackPromiseAdapter.h" | 7 #include "bindings/core/v8/CallbackPromiseAdapter.h" |
| 8 #include "bindings/core/v8/ScriptPromise.h" | 8 #include "bindings/core/v8/ScriptPromise.h" |
| 9 #include "bindings/core/v8/ScriptState.h" | 9 #include "bindings/core/v8/ScriptState.h" |
| 10 #include "core/dom/DOMException.h" | 10 #include "core/dom/DOMException.h" |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 // Promptly clears a raw reference from content/ to an on-heap object | 124 // Promptly clears a raw reference from content/ to an on-heap object |
| 125 // so that content/ doesn't access it in a lazy sweeping phase. | 125 // so that content/ doesn't access it in a lazy sweeping phase. |
| 126 m_handle.clear(); | 126 m_handle.clear(); |
| 127 } | 127 } |
| 128 | 128 |
| 129 DEFINE_TRACE(ServiceWorkerRegistration) | 129 DEFINE_TRACE(ServiceWorkerRegistration) |
| 130 { | 130 { |
| 131 visitor->trace(m_installing); | 131 visitor->trace(m_installing); |
| 132 visitor->trace(m_waiting); | 132 visitor->trace(m_waiting); |
| 133 visitor->trace(m_active); | 133 visitor->trace(m_active); |
| 134 RefCountedGarbageCollectedEventTargetWithInlineData<ServiceWorkerRegistratio
n>::trace(visitor); | 134 EventTargetWithInlineData::trace(visitor); |
| 135 ActiveDOMObject::trace(visitor); | 135 ActiveDOMObject::trace(visitor); |
| 136 Supplementable<ServiceWorkerRegistration>::trace(visitor); | 136 Supplementable<ServiceWorkerRegistration>::trace(visitor); |
| 137 } | 137 } |
| 138 | 138 |
| 139 bool ServiceWorkerRegistration::hasPendingActivity() const | 139 bool ServiceWorkerRegistration::hasPendingActivity() const |
| 140 { | 140 { |
| 141 return !m_stopped; | 141 return !m_stopped; |
| 142 } | 142 } |
| 143 | 143 |
| 144 void ServiceWorkerRegistration::stop() | 144 void ServiceWorkerRegistration::stop() |
| 145 { | 145 { |
| 146 if (m_stopped) | 146 if (m_stopped) |
| 147 return; | 147 return; |
| 148 m_stopped = true; | 148 m_stopped = true; |
| 149 m_handle->registration()->proxyStopped(); | 149 m_handle->registration()->proxyStopped(); |
| 150 } | 150 } |
| 151 | 151 |
| 152 } // namespace blink | 152 } // namespace blink |
| OLD | NEW |