| 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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 ServiceWorkerContainer* ServiceWorkerContainer::create( | 126 ServiceWorkerContainer* ServiceWorkerContainer::create( |
| 127 ExecutionContext* executionContext, | 127 ExecutionContext* executionContext, |
| 128 NavigatorServiceWorker* navigator) { | 128 NavigatorServiceWorker* navigator) { |
| 129 return new ServiceWorkerContainer(executionContext, navigator); | 129 return new ServiceWorkerContainer(executionContext, navigator); |
| 130 } | 130 } |
| 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(ExecutionContext*) { |
| 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 m_navigator->clearServiceWorker(); | 141 m_navigator->clearServiceWorker(); |
| 142 } | 142 } |
| 143 | 143 |
| 144 DEFINE_TRACE(ServiceWorkerContainer) { | 144 DEFINE_TRACE(ServiceWorkerContainer) { |
| 145 visitor->trace(m_controller); | 145 visitor->trace(m_controller); |
| 146 visitor->trace(m_ready); | 146 visitor->trace(m_ready); |
| (...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 473 | 473 |
| 474 if (ServiceWorkerContainerClient* client = | 474 if (ServiceWorkerContainerClient* client = |
| 475 ServiceWorkerContainerClient::from(executionContext)) { | 475 ServiceWorkerContainerClient::from(executionContext)) { |
| 476 m_provider = client->provider(); | 476 m_provider = client->provider(); |
| 477 if (m_provider) | 477 if (m_provider) |
| 478 m_provider->setClient(this); | 478 m_provider->setClient(this); |
| 479 } | 479 } |
| 480 } | 480 } |
| 481 | 481 |
| 482 } // namespace blink | 482 } // namespace blink |
| OLD | NEW |