| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2011, 2012 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 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 350 bridge->client()->didError(); | 350 bridge->client()->didError(); |
| 351 } | 351 } |
| 352 | 352 |
| 353 void Peer::didError() { | 353 void Peer::didError() { |
| 354 DCHECK(isMainThread()); | 354 DCHECK(isMainThread()); |
| 355 m_loaderProxy->postTaskToWorkerGlobalScope( | 355 m_loaderProxy->postTaskToWorkerGlobalScope( |
| 356 BLINK_FROM_HERE, | 356 BLINK_FROM_HERE, |
| 357 createCrossThreadTask(&workerGlobalScopeDidError, m_bridge)); | 357 createCrossThreadTask(&workerGlobalScopeDidError, m_bridge)); |
| 358 } | 358 } |
| 359 | 359 |
| 360 void Peer::contextDestroyed() { | 360 void Peer::contextDestroyed(WorkerThreadLifecycleContext*) { |
| 361 DCHECK(isMainThread()); | 361 DCHECK(isMainThread()); |
| 362 if (m_mainWebSocketChannel) { | 362 if (m_mainWebSocketChannel) { |
| 363 m_mainWebSocketChannel->disconnect(); | 363 m_mainWebSocketChannel->disconnect(); |
| 364 m_mainWebSocketChannel = nullptr; | 364 m_mainWebSocketChannel = nullptr; |
| 365 } | 365 } |
| 366 m_bridge = nullptr; | 366 m_bridge = nullptr; |
| 367 } | 367 } |
| 368 | 368 |
| 369 DEFINE_TRACE(Peer) { | 369 DEFINE_TRACE(Peer) { |
| 370 visitor->trace(m_mainWebSocketChannel); | 370 visitor->trace(m_mainWebSocketChannel); |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 484 m_peer = nullptr; | 484 m_peer = nullptr; |
| 485 m_workerGlobalScope.clear(); | 485 m_workerGlobalScope.clear(); |
| 486 } | 486 } |
| 487 | 487 |
| 488 DEFINE_TRACE(Bridge) { | 488 DEFINE_TRACE(Bridge) { |
| 489 visitor->trace(m_client); | 489 visitor->trace(m_client); |
| 490 visitor->trace(m_workerGlobalScope); | 490 visitor->trace(m_workerGlobalScope); |
| 491 } | 491 } |
| 492 | 492 |
| 493 } // namespace blink | 493 } // namespace blink |
| OLD | NEW |