| 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 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 if (m_provider) { | 184 if (m_provider) { |
| 185 m_provider->setClient(0); | 185 m_provider->setClient(0); |
| 186 m_provider = nullptr; | 186 m_provider = nullptr; |
| 187 } | 187 } |
| 188 } | 188 } |
| 189 | 189 |
| 190 DEFINE_TRACE(ServiceWorkerContainer) | 190 DEFINE_TRACE(ServiceWorkerContainer) |
| 191 { | 191 { |
| 192 visitor->trace(m_controller); | 192 visitor->trace(m_controller); |
| 193 visitor->trace(m_ready); | 193 visitor->trace(m_ready); |
| 194 RefCountedGarbageCollectedEventTargetWithInlineData<ServiceWorkerContainer>:
:trace(visitor); | 194 EventTargetWithInlineData::trace(visitor); |
| 195 ContextLifecycleObserver::trace(visitor); | 195 ContextLifecycleObserver::trace(visitor); |
| 196 } | 196 } |
| 197 | 197 |
| 198 void ServiceWorkerContainer::registerServiceWorkerImpl(ExecutionContext* executi
onContext, const KURL& rawScriptURL, const KURL& scope, PassOwnPtr<RegistrationC
allbacks> callbacks) | 198 void ServiceWorkerContainer::registerServiceWorkerImpl(ExecutionContext* executi
onContext, const KURL& rawScriptURL, const KURL& scope, PassOwnPtr<RegistrationC
allbacks> callbacks) |
| 199 { | 199 { |
| 200 if (!m_provider) { | 200 if (!m_provider) { |
| 201 callbacks->onError(WebServiceWorkerError(WebServiceWorkerError::ErrorTyp
eState, "Failed to register a ServiceWorker: The document is in an invalid state
.")); | 201 callbacks->onError(WebServiceWorkerError(WebServiceWorkerError::ErrorTyp
eState, "Failed to register a ServiceWorker: The document is in an invalid state
.")); |
| 202 return; | 202 return; |
| 203 } | 203 } |
| 204 | 204 |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 417 return; | 417 return; |
| 418 | 418 |
| 419 if (ServiceWorkerContainerClient* client = ServiceWorkerContainerClient::fro
m(executionContext)) { | 419 if (ServiceWorkerContainerClient* client = ServiceWorkerContainerClient::fro
m(executionContext)) { |
| 420 m_provider = client->provider(); | 420 m_provider = client->provider(); |
| 421 if (m_provider) | 421 if (m_provider) |
| 422 m_provider->setClient(this); | 422 m_provider->setClient(this); |
| 423 } | 423 } |
| 424 } | 424 } |
| 425 | 425 |
| 426 } // namespace blink | 426 } // namespace blink |
| OLD | NEW |