| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 300 // SuspendableObject | 300 // SuspendableObject |
| 301 void RTCDataChannel::suspend() { | 301 void RTCDataChannel::suspend() { |
| 302 m_scheduledEventTimer.stop(); | 302 m_scheduledEventTimer.stop(); |
| 303 } | 303 } |
| 304 | 304 |
| 305 void RTCDataChannel::resume() { | 305 void RTCDataChannel::resume() { |
| 306 if (!m_scheduledEvents.isEmpty() && !m_scheduledEventTimer.isActive()) | 306 if (!m_scheduledEvents.isEmpty() && !m_scheduledEventTimer.isActive()) |
| 307 m_scheduledEventTimer.startOneShot(0, BLINK_FROM_HERE); | 307 m_scheduledEventTimer.startOneShot(0, BLINK_FROM_HERE); |
| 308 } | 308 } |
| 309 | 309 |
| 310 void RTCDataChannel::contextDestroyed() { | 310 void RTCDataChannel::contextDestroyed(ExecutionContext*) { |
| 311 if (m_stopped) | 311 if (m_stopped) |
| 312 return; | 312 return; |
| 313 | 313 |
| 314 m_stopped = true; | 314 m_stopped = true; |
| 315 m_handler->setClient(nullptr); | 315 m_handler->setClient(nullptr); |
| 316 m_handler.reset(); | 316 m_handler.reset(); |
| 317 } | 317 } |
| 318 | 318 |
| 319 // ActiveScriptWrappable | 319 // ActiveScriptWrappable |
| 320 bool RTCDataChannel::hasPendingActivity() const { | 320 bool RTCDataChannel::hasPendingActivity() const { |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 370 events.clear(); | 370 events.clear(); |
| 371 } | 371 } |
| 372 | 372 |
| 373 DEFINE_TRACE(RTCDataChannel) { | 373 DEFINE_TRACE(RTCDataChannel) { |
| 374 visitor->trace(m_scheduledEvents); | 374 visitor->trace(m_scheduledEvents); |
| 375 EventTargetWithInlineData::trace(visitor); | 375 EventTargetWithInlineData::trace(visitor); |
| 376 SuspendableObject::trace(visitor); | 376 SuspendableObject::trace(visitor); |
| 377 } | 377 } |
| 378 | 378 |
| 379 } // namespace blink | 379 } // namespace blink |
| OLD | NEW |