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 "config.h" | 5 #include "config.h" |
6 #include "ServiceWorkerRegistration.h" | 6 #include "ServiceWorkerRegistration.h" |
7 | 7 |
8 #include "bindings/core/v8/CallbackPromiseAdapter.h" | 8 #include "bindings/core/v8/CallbackPromiseAdapter.h" |
9 #include "bindings/core/v8/ScriptPromise.h" | 9 #include "bindings/core/v8/ScriptPromise.h" |
10 #include "bindings/core/v8/ScriptPromiseResolver.h" | 10 #include "bindings/core/v8/ScriptPromiseResolver.h" |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 m_provider = client->provider(); | 154 m_provider = client->provider(); |
155 m_outerRegistration->setProxy(this); | 155 m_outerRegistration->setProxy(this); |
156 } | 156 } |
157 | 157 |
158 void ServiceWorkerRegistration::trace(Visitor* visitor) | 158 void ServiceWorkerRegistration::trace(Visitor* visitor) |
159 { | 159 { |
160 visitor->trace(m_installing); | 160 visitor->trace(m_installing); |
161 visitor->trace(m_waiting); | 161 visitor->trace(m_waiting); |
162 visitor->trace(m_active); | 162 visitor->trace(m_active); |
163 EventTargetWithInlineData::trace(visitor); | 163 EventTargetWithInlineData::trace(visitor); |
| 164 HeapSupplementable<ServiceWorkerRegistration>::trace(visitor); |
164 } | 165 } |
165 | 166 |
166 bool ServiceWorkerRegistration::hasPendingActivity() const | 167 bool ServiceWorkerRegistration::hasPendingActivity() const |
167 { | 168 { |
168 return !m_stopped; | 169 return !m_stopped; |
169 } | 170 } |
170 | 171 |
171 void ServiceWorkerRegistration::stop() | 172 void ServiceWorkerRegistration::stop() |
172 { | 173 { |
173 if (m_stopped) | 174 if (m_stopped) |
174 return; | 175 return; |
175 m_stopped = true; | 176 m_stopped = true; |
176 m_outerRegistration->proxyStopped(); | 177 m_outerRegistration->proxyStopped(); |
177 } | 178 } |
178 | 179 |
179 } // namespace blink | 180 } // namespace blink |
OLD | NEW |