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 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 | 79 |
80 void RTCSessionDescriptionRequestImpl::requestFailed(const String& error) { | 80 void RTCSessionDescriptionRequestImpl::requestFailed(const String& error) { |
81 bool shouldFireCallback = | 81 bool shouldFireCallback = |
82 m_requester ? m_requester->shouldFireDefaultCallbacks() : false; | 82 m_requester ? m_requester->shouldFireDefaultCallbacks() : false; |
83 if (shouldFireCallback && m_errorCallback) | 83 if (shouldFireCallback && m_errorCallback) |
84 m_errorCallback->handleEvent(DOMException::create(OperationError, error)); | 84 m_errorCallback->handleEvent(DOMException::create(OperationError, error)); |
85 | 85 |
86 clear(); | 86 clear(); |
87 } | 87 } |
88 | 88 |
89 void RTCSessionDescriptionRequestImpl::stop() { | 89 void RTCSessionDescriptionRequestImpl::contextDestroyed() { |
90 clear(); | 90 clear(); |
91 } | 91 } |
92 | 92 |
93 void RTCSessionDescriptionRequestImpl::clear() { | 93 void RTCSessionDescriptionRequestImpl::clear() { |
94 m_successCallback.clear(); | 94 m_successCallback.clear(); |
95 m_errorCallback.clear(); | 95 m_errorCallback.clear(); |
96 m_requester.clear(); | 96 m_requester.clear(); |
97 } | 97 } |
98 | 98 |
99 DEFINE_TRACE(RTCSessionDescriptionRequestImpl) { | 99 DEFINE_TRACE(RTCSessionDescriptionRequestImpl) { |
100 visitor->trace(m_successCallback); | 100 visitor->trace(m_successCallback); |
101 visitor->trace(m_errorCallback); | 101 visitor->trace(m_errorCallback); |
102 visitor->trace(m_requester); | 102 visitor->trace(m_requester); |
103 RTCSessionDescriptionRequest::trace(visitor); | 103 RTCSessionDescriptionRequest::trace(visitor); |
104 ActiveDOMObject::trace(visitor); | 104 ActiveDOMObject::trace(visitor); |
105 } | 105 } |
106 | 106 |
107 } // namespace blink | 107 } // namespace blink |
OLD | NEW |