| 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 421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 432 if (exceptionState.hadException()) | 432 if (exceptionState.hadException()) |
| 433 return 0; | 433 return 0; |
| 434 | 434 |
| 435 // Make sure no certificates have expired. | 435 // Make sure no certificates have expired. |
| 436 if (configuration.certificates.size() > 0) { | 436 if (configuration.certificates.size() > 0) { |
| 437 DOMTimeStamp now = convertSecondsToDOMTimeStamp(currentTime()); | 437 DOMTimeStamp now = convertSecondsToDOMTimeStamp(currentTime()); |
| 438 for (const std::unique_ptr<WebRTCCertificate>& certificate : | 438 for (const std::unique_ptr<WebRTCCertificate>& certificate : |
| 439 configuration.certificates) { | 439 configuration.certificates) { |
| 440 DOMTimeStamp expires = certificate->expires(); | 440 DOMTimeStamp expires = certificate->expires(); |
| 441 if (expires <= now) { | 441 if (expires <= now) { |
| 442 // TODO(hbos): Per https://w3c.github.io/webrtc-pc/#operation this | 442 exceptionState.throwDOMException(InvalidAccessError, |
| 443 // should throw InvalidAccessError, not InvalidStateError. | |
| 444 exceptionState.throwDOMException(InvalidStateError, | |
| 445 "Expired certificate(s)."); | 443 "Expired certificate(s)."); |
| 446 return 0; | 444 return 0; |
| 447 } | 445 } |
| 448 } | 446 } |
| 449 } | 447 } |
| 450 | 448 |
| 451 MediaErrorState mediaErrorState; | 449 MediaErrorState mediaErrorState; |
| 452 WebMediaConstraints constraints = | 450 WebMediaConstraints constraints = |
| 453 MediaConstraintsImpl::create(context, mediaConstraints, mediaErrorState); | 451 MediaConstraintsImpl::create(context, mediaConstraints, mediaErrorState); |
| 454 if (mediaErrorState.hadException()) { | 452 if (mediaErrorState.hadException()) { |
| (...skipping 1012 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1467 DEFINE_TRACE(RTCPeerConnection) { | 1465 DEFINE_TRACE(RTCPeerConnection) { |
| 1468 visitor->trace(m_localStreams); | 1466 visitor->trace(m_localStreams); |
| 1469 visitor->trace(m_remoteStreams); | 1467 visitor->trace(m_remoteStreams); |
| 1470 visitor->trace(m_dispatchScheduledEventRunner); | 1468 visitor->trace(m_dispatchScheduledEventRunner); |
| 1471 visitor->trace(m_scheduledEvents); | 1469 visitor->trace(m_scheduledEvents); |
| 1472 EventTargetWithInlineData::trace(visitor); | 1470 EventTargetWithInlineData::trace(visitor); |
| 1473 ActiveDOMObject::trace(visitor); | 1471 ActiveDOMObject::trace(visitor); |
| 1474 } | 1472 } |
| 1475 | 1473 |
| 1476 } // namespace blink | 1474 } // namespace blink |
| OLD | NEW |