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 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 | 237 |
238 void ServiceWorkerGlobalScopeProxy::workerGlobalScopeStarted(WorkerGlobalScope*
workerGlobalScope) | 238 void ServiceWorkerGlobalScopeProxy::workerGlobalScopeStarted(WorkerGlobalScope*
workerGlobalScope) |
239 { | 239 { |
240 DCHECK(!m_workerGlobalScope); | 240 DCHECK(!m_workerGlobalScope); |
241 m_workerGlobalScope = static_cast<ServiceWorkerGlobalScope*>(workerGlobalSco
pe); | 241 m_workerGlobalScope = static_cast<ServiceWorkerGlobalScope*>(workerGlobalSco
pe); |
242 client().workerContextStarted(this); | 242 client().workerContextStarted(this); |
243 } | 243 } |
244 | 244 |
245 void ServiceWorkerGlobalScopeProxy::workerGlobalScopeClosed() | 245 void ServiceWorkerGlobalScopeProxy::workerGlobalScopeClosed() |
246 { | 246 { |
247 DCHECK(m_embeddedWorker); | 247 // This should never be called because close() is not defined in |
248 document().postTask(BLINK_FROM_HERE, createCrossThreadTask(&WebEmbeddedWorke
rImpl::terminateWorkerContext, AllowCrossThreadAccess(m_embeddedWorker))); | 248 // ServiceWorkerGlobalScope. |
| 249 NOTREACHED(); |
249 } | 250 } |
250 | 251 |
251 void ServiceWorkerGlobalScopeProxy::willDestroyWorkerGlobalScope() | 252 void ServiceWorkerGlobalScopeProxy::willDestroyWorkerGlobalScope() |
252 { | 253 { |
253 v8::HandleScope handleScope(workerGlobalScope()->thread()->isolate()); | 254 v8::HandleScope handleScope(workerGlobalScope()->thread()->isolate()); |
254 client().willDestroyWorkerContext(workerGlobalScope()->scriptController()->c
ontext()); | 255 client().willDestroyWorkerContext(workerGlobalScope()->scriptController()->c
ontext()); |
255 m_workerGlobalScope = nullptr; | 256 m_workerGlobalScope = nullptr; |
256 } | 257 } |
257 | 258 |
258 void ServiceWorkerGlobalScopeProxy::workerThreadTerminated() | 259 void ServiceWorkerGlobalScopeProxy::workerThreadTerminated() |
(...skipping 29 matching lines...) Expand all Loading... |
288 return *m_document; | 289 return *m_document; |
289 } | 290 } |
290 | 291 |
291 ServiceWorkerGlobalScope* ServiceWorkerGlobalScopeProxy::workerGlobalScope() con
st | 292 ServiceWorkerGlobalScope* ServiceWorkerGlobalScopeProxy::workerGlobalScope() con
st |
292 { | 293 { |
293 DCHECK(m_workerGlobalScope); | 294 DCHECK(m_workerGlobalScope); |
294 return m_workerGlobalScope; | 295 return m_workerGlobalScope; |
295 } | 296 } |
296 | 297 |
297 } // namespace blink | 298 } // namespace blink |
OLD | NEW |