OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 | 131 |
132 ServiceWorkerContainer::~ServiceWorkerContainer() { | 132 ServiceWorkerContainer::~ServiceWorkerContainer() { |
133 ASSERT(!m_provider); | 133 ASSERT(!m_provider); |
134 } | 134 } |
135 | 135 |
136 void ServiceWorkerContainer::contextDestroyed() { | 136 void ServiceWorkerContainer::contextDestroyed() { |
137 if (m_provider) { | 137 if (m_provider) { |
138 m_provider->setClient(0); | 138 m_provider->setClient(0); |
139 m_provider = nullptr; | 139 m_provider = nullptr; |
140 } | 140 } |
141 if (m_navigator) | 141 m_navigator->clearServiceWorker(); |
142 m_navigator->clearServiceWorker(); | |
143 } | 142 } |
144 | 143 |
145 DEFINE_TRACE(ServiceWorkerContainer) { | 144 DEFINE_TRACE(ServiceWorkerContainer) { |
146 visitor->trace(m_controller); | 145 visitor->trace(m_controller); |
147 visitor->trace(m_ready); | 146 visitor->trace(m_ready); |
148 visitor->trace(m_navigator); | 147 visitor->trace(m_navigator); |
149 EventTargetWithInlineData::trace(visitor); | 148 EventTargetWithInlineData::trace(visitor); |
150 ContextLifecycleObserver::trace(visitor); | 149 ContextLifecycleObserver::trace(visitor); |
151 } | 150 } |
152 | 151 |
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
474 | 473 |
475 if (ServiceWorkerContainerClient* client = | 474 if (ServiceWorkerContainerClient* client = |
476 ServiceWorkerContainerClient::from(executionContext)) { | 475 ServiceWorkerContainerClient::from(executionContext)) { |
477 m_provider = client->provider(); | 476 m_provider = client->provider(); |
478 if (m_provider) | 477 if (m_provider) |
479 m_provider->setClient(this); | 478 m_provider->setClient(this); |
480 } | 479 } |
481 } | 480 } |
482 | 481 |
483 } // namespace blink | 482 } // namespace blink |
OLD | NEW |