summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulie Jeongeun Kim <jkim@igalia.com>2019-12-12 09:37:13 +0000
committerMichael BrĂ¼ning <michael.bruning@qt.io>2020-07-24 16:00:14 +0000
commit9b27a193c632557ddd0d7709219f9709f3281312 (patch)
treee207a0f1160de0ec4bbb0407bfa9581559b34b42
parentc3d5696193ad9a009311dba21c13a5d759b90ce0 (diff)
downloadqtwebengine-chromium-9b27a193c632557ddd0d7709219f9709f3281312.tar.gz
[Backport] Dependency for CVE-2020-6534
Manual cherry-pick of patch originally reviewed on https://chromium-review.googlesource.com/c/chromium/src/+/1961827: Use [RaisesException] for immediate promise rejections in peerconnection This is a part of effort for using [RaisesException] when synchronously rejecting a promise. It uses [RaisesException] for //third_party/blink/renderer/modules/peerconnection. Bug: 1001114 Change-Id: I0d309be08a87e99af777a802301f55242c367057 Reviewed-by: Guido Urdaneta <guidou@chromium.org> Commit-Queue: Julie Kim <jkim@igalia.com> Cr-Commit-Position: refs/heads/master@{#724165} Reviewed-by: Michal Klocek <michal.klocek@qt.io>
-rw-r--r--chromium/third_party/blink/renderer/modules/peerconnection/rtc_peer_connection.cc109
-rw-r--r--chromium/third_party/blink/renderer/modules/peerconnection/rtc_peer_connection.h18
-rw-r--r--chromium/third_party/blink/renderer/modules/peerconnection/rtc_peer_connection.idl8
-rw-r--r--chromium/third_party/blink/renderer/modules/peerconnection/rtc_peer_connection_test.cc54
4 files changed, 106 insertions, 83 deletions
diff --git a/chromium/third_party/blink/renderer/modules/peerconnection/rtc_peer_connection.cc b/chromium/third_party/blink/renderer/modules/peerconnection/rtc_peer_connection.cc
index bc1fbe96f38..e352df0ad46 100644
--- a/chromium/third_party/blink/renderer/modules/peerconnection/rtc_peer_connection.cc
+++ b/chromium/third_party/blink/renderer/modules/peerconnection/rtc_peer_connection.cc
@@ -121,7 +121,6 @@
#include "third_party/blink/renderer/platform/wtf/functional.h"
#include "third_party/blink/renderer/platform/wtf/std_lib_extras.h"
#include "third_party/webrtc/api/data_channel_interface.h"
-
#include "third_party/webrtc/api/dtls_transport_interface.h"
#include "third_party/webrtc/api/jsep.h"
#include "third_party/webrtc/api/peer_connection_interface.h"
@@ -836,13 +835,13 @@ void RTCPeerConnection::Dispose() {
}
ScriptPromise RTCPeerConnection::createOffer(ScriptState* script_state,
- const RTCOfferOptions* options) {
+ const RTCOfferOptions* options,
+ ExceptionState& exception_state) {
if (signaling_state_ ==
webrtc::PeerConnectionInterface::SignalingState::kClosed) {
- return ScriptPromise::RejectWithDOMException(
- script_state,
- MakeGarbageCollected<DOMException>(DOMExceptionCode::kInvalidStateError,
- kSignalingStateClosedMessage));
+ exception_state.ThrowDOMException(DOMExceptionCode::kInvalidStateError,
+ kSignalingStateClosedMessage);
+ return ScriptPromise();
}
call_setup_state_tracker_.NoteOffererStateEvent(
OffererState::kCreateOfferPending, HasDocumentMedia());
@@ -935,13 +934,13 @@ ScriptPromise RTCPeerConnection::createOffer(
}
ScriptPromise RTCPeerConnection::createAnswer(ScriptState* script_state,
- const RTCAnswerOptions* options) {
+ const RTCAnswerOptions* options,
+ ExceptionState& exception_state) {
if (signaling_state_ ==
webrtc::PeerConnectionInterface::SignalingState::kClosed) {
- return ScriptPromise::RejectWithDOMException(
- script_state,
- MakeGarbageCollected<DOMException>(DOMExceptionCode::kInvalidStateError,
- kSignalingStateClosedMessage));
+ exception_state.ThrowDOMException(DOMExceptionCode::kInvalidStateError,
+ kSignalingStateClosedMessage);
+ return ScriptPromise();
}
call_setup_state_tracker_.NoteAnswererStateEvent(
@@ -1277,7 +1276,8 @@ ScriptPromise RTCPeerConnection::setLocalDescription(
ScriptPromise RTCPeerConnection::setLocalDescription(
ScriptState* script_state,
- const RTCSessionDescriptionInit* session_description_init) {
+ const RTCSessionDescriptionInit* session_description_init,
+ ExceptionState& exception_state) {
if (session_description_init->type().IsNull() &&
session_description_init->sdp().IsNull()) {
return setLocalDescription(script_state);
@@ -1291,7 +1291,10 @@ ScriptPromise RTCPeerConnection::setLocalDescription(
DOMException* exception = checkSdpForStateErrors(
ExecutionContext::From(script_state), session_description_init, &sdp);
if (exception) {
- return ScriptPromise::RejectWithDOMException(script_state, exception);
+ exception_state.ThrowDOMException(
+ static_cast<DOMExceptionCode>(exception->code()),
+ exception->message());
+ return ScriptPromise();
}
}
NoteCallSetupStateEventPending(SetSdpOperationType::kSetLocalDescription,
@@ -1385,7 +1388,8 @@ RTCSessionDescription* RTCPeerConnection::pendingLocalDescription() {
ScriptPromise RTCPeerConnection::setRemoteDescription(
ScriptState* script_state,
- const RTCSessionDescriptionInit* session_description_init) {
+ const RTCSessionDescriptionInit* session_description_init,
+ ExceptionState& exception_state) {
if (session_description_init->type() != "rollback") {
MaybeWarnAboutUnsafeSdp(session_description_init);
ReportSetSdpUsage(SetSdpOperationType::kSetRemoteDescription,
@@ -1393,10 +1397,9 @@ ScriptPromise RTCPeerConnection::setRemoteDescription(
}
if (signaling_state_ ==
webrtc::PeerConnectionInterface::SignalingState::kClosed) {
- return ScriptPromise::RejectWithDOMException(
- script_state,
- MakeGarbageCollected<DOMException>(DOMExceptionCode::kInvalidStateError,
- kSignalingStateClosedMessage));
+ exception_state.ThrowDOMException(DOMExceptionCode::kInvalidStateError,
+ kSignalingStateClosedMessage);
+ return ScriptPromise();
}
NoteCallSetupStateEventPending(SetSdpOperationType::kSetRemoteDescription,
@@ -1686,10 +1689,9 @@ ScriptPromise RTCPeerConnection::generateCertificate(
crypto_algorithm.RsaHashedKeyGenParams()->ModulusLengthBits();
key_params = rtc::KeyParams::RSA(modulus_length, public_exponent);
} else {
- return ScriptPromise::RejectWithDOMException(
- script_state, MakeGarbageCollected<DOMException>(
- DOMExceptionCode::kNotSupportedError,
- unsupported_params_string));
+ exception_state.ThrowDOMException(DOMExceptionCode::kNotSupportedError,
+ unsupported_params_string);
+ return ScriptPromise();
}
break;
case kWebCryptoAlgorithmIdEcdsa:
@@ -1699,19 +1701,17 @@ ScriptPromise RTCPeerConnection::generateCertificate(
kWebCryptoNamedCurveP256) {
key_params = rtc::KeyParams::ECDSA(rtc::EC_NIST_P256);
} else {
- return ScriptPromise::RejectWithDOMException(
- script_state, MakeGarbageCollected<DOMException>(
- DOMExceptionCode::kNotSupportedError,
- unsupported_params_string));
+ exception_state.ThrowDOMException(DOMExceptionCode::kNotSupportedError,
+ unsupported_params_string);
+ return ScriptPromise();
}
break;
default:
- return ScriptPromise::RejectWithDOMException(
- script_state, MakeGarbageCollected<DOMException>(
- DOMExceptionCode::kNotSupportedError,
- "The 1st argument provided is an "
- "AlgorithmIdentifier, but the "
- "algorithm is not supported."));
+ exception_state.ThrowDOMException(DOMExceptionCode::kNotSupportedError,
+ "The 1st argument provided is an "
+ "AlgorithmIdentifier, but the "
+ "algorithm is not supported.");
+ return ScriptPromise();
break;
}
DCHECK(key_params.has_value());
@@ -1721,10 +1721,9 @@ ScriptPromise RTCPeerConnection::generateCertificate(
// |keyParams| was successfully constructed, but does the certificate
// generator support these parameters?
if (!certificate_generator->IsSupportedKeyParams(key_params.value())) {
- return ScriptPromise::RejectWithDOMException(
- script_state,
- MakeGarbageCollected<DOMException>(DOMExceptionCode::kNotSupportedError,
- unsupported_params_string));
+ exception_state.ThrowDOMException(DOMExceptionCode::kNotSupportedError,
+ unsupported_params_string);
+ return ScriptPromise();
}
auto* resolver = MakeGarbageCollected<ScriptPromiseResolver>(script_state);
@@ -1759,10 +1758,9 @@ ScriptPromise RTCPeerConnection::addIceCandidate(
ExceptionState& exception_state) {
if (signaling_state_ ==
webrtc::PeerConnectionInterface::SignalingState::kClosed) {
- return ScriptPromise::RejectWithDOMException(
- script_state,
- MakeGarbageCollected<DOMException>(DOMExceptionCode::kInvalidStateError,
- kSignalingStateClosedMessage));
+ exception_state.ThrowDOMException(DOMExceptionCode::kInvalidStateError,
+ kSignalingStateClosedMessage);
+ return ScriptPromise();
}
if (IsIceCandidateMissingSdp(candidate)) {
@@ -2064,12 +2062,12 @@ ScriptPromise RTCPeerConnection::getStats(ScriptState* script_state,
// "getStats(optional MediaStreamTrack? selector)". null is a valid selector
// value, but a value of the wrong type isn't.
if (first_argument->IsNullOrUndefined())
- return PromiseBasedGetStats(script_state, nullptr);
+ return PromiseBasedGetStats(script_state, nullptr, exception_state);
MediaStreamTrack* track =
V8MediaStreamTrack::ToImplWithTypeCheck(isolate, first_argument);
if (track)
- return PromiseBasedGetStats(script_state, track);
+ return PromiseBasedGetStats(script_state, track, exception_state);
exception_state.ThrowTypeError(
"The argument provided as parameter 1 is neither a callback (function) "
@@ -2098,17 +2096,17 @@ ScriptPromise RTCPeerConnection::LegacyCallbackBasedGetStats(
ScriptPromise RTCPeerConnection::PromiseBasedGetStats(
ScriptState* script_state,
- MediaStreamTrack* selector) {
+ MediaStreamTrack* selector,
+ ExceptionState& exception_state) {
if (!selector) {
ExecutionContext* context = ExecutionContext::From(script_state);
UseCounter::Count(context, WebFeature::kRTCPeerConnectionGetStats);
if (!peer_handler_) {
LOG(ERROR) << "Internal error: peer_handler_ has been discarded";
- return ScriptPromise::RejectWithDOMException(
- script_state, MakeGarbageCollected<DOMException>(
- DOMExceptionCode::kOperationError,
- "Internal error: release in progress"));
+ exception_state.ThrowDOMException(DOMExceptionCode::kOperationError,
+ "Internal error: release in progress");
+ return ScriptPromise();
}
auto* resolver = MakeGarbageCollected<ScriptPromiseResolver>(script_state);
ScriptPromise promise = resolver->Promise();
@@ -2136,17 +2134,16 @@ ScriptPromise RTCPeerConnection::PromiseBasedGetStats(
}
}
if (track_uses == 0u) {
- return ScriptPromise::RejectWithDOMException(
- script_state, MakeGarbageCollected<DOMException>(
- DOMExceptionCode::kInvalidAccessError,
- "There is no sender or receiver for the track."));
+ exception_state.ThrowDOMException(
+ DOMExceptionCode::kInvalidAccessError,
+ "There is no sender or receiver for the track.");
+ return ScriptPromise();
}
if (track_uses > 1u) {
- return ScriptPromise::RejectWithDOMException(
- script_state,
- MakeGarbageCollected<DOMException>(
- DOMExceptionCode::kInvalidAccessError,
- "There are more than one sender or receiver for the track."));
+ exception_state.ThrowDOMException(
+ DOMExceptionCode::kInvalidAccessError,
+ "There are more than one sender or receiver for the track.");
+ return ScriptPromise();
}
// There is just one use of the track, a sender or receiver.
if (track_sender) {
diff --git a/chromium/third_party/blink/renderer/modules/peerconnection/rtc_peer_connection.h b/chromium/third_party/blink/renderer/modules/peerconnection/rtc_peer_connection.h
index d756173ba4b..c1528a2a90e 100644
--- a/chromium/third_party/blink/renderer/modules/peerconnection/rtc_peer_connection.h
+++ b/chromium/third_party/blink/renderer/modules/peerconnection/rtc_peer_connection.h
@@ -131,14 +131,18 @@ class MODULES_EXPORT RTCPeerConnection final
ExceptionState&);
~RTCPeerConnection() override;
- ScriptPromise createOffer(ScriptState*, const RTCOfferOptions*);
+ ScriptPromise createOffer(ScriptState*,
+ const RTCOfferOptions*,
+ ExceptionState&);
ScriptPromise createOffer(ScriptState*,
V8RTCSessionDescriptionCallback*,
V8RTCPeerConnectionErrorCallback*,
const Dictionary&,
ExceptionState&);
- ScriptPromise createAnswer(ScriptState*, const RTCAnswerOptions*);
+ ScriptPromise createAnswer(ScriptState*,
+ const RTCAnswerOptions*,
+ ExceptionState&);
ScriptPromise createAnswer(ScriptState*,
V8RTCSessionDescriptionCallback*,
V8RTCPeerConnectionErrorCallback*,
@@ -146,7 +150,8 @@ class MODULES_EXPORT RTCPeerConnection final
ScriptPromise setLocalDescription(ScriptState*);
ScriptPromise setLocalDescription(ScriptState*,
- const RTCSessionDescriptionInit*);
+ const RTCSessionDescriptionInit*,
+ ExceptionState&);
ScriptPromise setLocalDescription(
ScriptState*,
const RTCSessionDescriptionInit*,
@@ -157,7 +162,8 @@ class MODULES_EXPORT RTCPeerConnection final
RTCSessionDescription* pendingLocalDescription();
ScriptPromise setRemoteDescription(ScriptState*,
- const RTCSessionDescriptionInit*);
+ const RTCSessionDescriptionInit*,
+ ExceptionState&);
ScriptPromise setRemoteDescription(
ScriptState*,
const RTCSessionDescriptionInit*,
@@ -224,7 +230,9 @@ class MODULES_EXPORT RTCPeerConnection final
ScriptState*,
V8RTCStatsCallback* success_callback,
MediaStreamTrack* selector);
- ScriptPromise PromiseBasedGetStats(ScriptState*, MediaStreamTrack* selector);
+ ScriptPromise PromiseBasedGetStats(ScriptState*,
+ MediaStreamTrack* selector,
+ ExceptionState&);
const HeapVector<Member<RTCRtpTransceiver>>& getTransceivers() const;
const HeapVector<Member<RTCRtpSender>>& getSenders() const;
diff --git a/chromium/third_party/blink/renderer/modules/peerconnection/rtc_peer_connection.idl b/chromium/third_party/blink/renderer/modules/peerconnection/rtc_peer_connection.idl
index 916ffb2b598..8903fb5669a 100644
--- a/chromium/third_party/blink/renderer/modules/peerconnection/rtc_peer_connection.idl
+++ b/chromium/third_party/blink/renderer/modules/peerconnection/rtc_peer_connection.idl
@@ -70,13 +70,13 @@ enum RTCPeerConnectionState {
RaisesException=Constructor,
Exposed=Window
] interface RTCPeerConnection : EventTarget {
- [CallWith=ScriptState] Promise<RTCSessionDescription> createOffer(optional RTCOfferOptions options);
- [CallWith=ScriptState] Promise<RTCSessionDescription> createAnswer(optional RTCAnswerOptions options);
- [CallWith=ScriptState] Promise<void> setLocalDescription(optional RTCSessionDescriptionInit description = {});
+ [CallWith=ScriptState, RaisesException] Promise<RTCSessionDescription> createOffer(optional RTCOfferOptions options);
+ [CallWith=ScriptState, RaisesException] Promise<RTCSessionDescription> createAnswer(optional RTCAnswerOptions options);
+ [CallWith=ScriptState, RaisesException] Promise<void> setLocalDescription(optional RTCSessionDescriptionInit description = {});
readonly attribute RTCSessionDescription? localDescription;
readonly attribute RTCSessionDescription? currentLocalDescription;
readonly attribute RTCSessionDescription? pendingLocalDescription;
- [CallWith=ScriptState] Promise<void> setRemoteDescription(RTCSessionDescriptionInit description);
+ [CallWith=ScriptState, RaisesException] Promise<void> setRemoteDescription(RTCSessionDescriptionInit description);
readonly attribute RTCSessionDescription? remoteDescription;
readonly attribute RTCSessionDescription? currentRemoteDescription;
readonly attribute RTCSessionDescription? pendingRemoteDescription;
diff --git a/chromium/third_party/blink/renderer/modules/peerconnection/rtc_peer_connection_test.cc b/chromium/third_party/blink/renderer/modules/peerconnection/rtc_peer_connection_test.cc
index 9daaa9e8a3e..10769fde4ea 100644
--- a/chromium/third_party/blink/renderer/modules/peerconnection/rtc_peer_connection_test.cc
+++ b/chromium/third_party/blink/renderer/modules/peerconnection/rtc_peer_connection_test.cc
@@ -832,18 +832,21 @@ TEST_F(RTCPeerConnectionCallSetupStateTest, OffererSucceeded) {
V8TestingScope scope;
RTCPeerConnection* pc = Initialize(scope);
// createOffer()
- pc->createOffer(scope.GetScriptState(), RTCOfferOptions::Create());
+ pc->createOffer(scope.GetScriptState(), RTCOfferOptions::Create(),
+ scope.GetExceptionState());
EXPECT_EQ(OffererState::kCreateOfferPending, tracker_->offerer_state());
EXPECT_EQ(CallSetupState::kStarted, tracker_->GetCallSetupState());
platform_->RunUntilIdle();
EXPECT_EQ(OffererState::kCreateOfferResolved, tracker_->offerer_state());
// setLocalDescription(offer)
- pc->setLocalDescription(scope.GetScriptState(), EmptyOffer());
+ pc->setLocalDescription(scope.GetScriptState(), EmptyOffer(),
+ scope.GetExceptionState());
EXPECT_EQ(OffererState::kSetLocalOfferPending, tracker_->offerer_state());
platform_->RunUntilIdle();
EXPECT_EQ(OffererState::kSetLocalOfferResolved, tracker_->offerer_state());
// setRemoteDescription(answer)
- pc->setRemoteDescription(scope.GetScriptState(), EmptyAnswer());
+ pc->setRemoteDescription(scope.GetScriptState(), EmptyAnswer(),
+ scope.GetExceptionState());
EXPECT_EQ(OffererState::kSetRemoteAnswerPending, tracker_->offerer_state());
EXPECT_EQ(CallSetupState::kStarted, tracker_->GetCallSetupState());
platform_->RunUntilIdle();
@@ -856,7 +859,8 @@ TEST_F(RTCPeerConnectionCallSetupStateTest, OffererFailedAtCreateOffer) {
RTCPeerConnection* pc = Initialize(scope);
// createOffer()
SetNextOperationIsSuccessful(false);
- pc->createOffer(scope.GetScriptState(), RTCOfferOptions::Create());
+ pc->createOffer(scope.GetScriptState(), RTCOfferOptions::Create(),
+ scope.GetExceptionState());
platform_->RunUntilIdle();
EXPECT_EQ(OffererState::kCreateOfferRejected, tracker_->offerer_state());
EXPECT_EQ(CallSetupState::kFailed, tracker_->GetCallSetupState());
@@ -867,11 +871,13 @@ TEST_F(RTCPeerConnectionCallSetupStateTest,
V8TestingScope scope;
RTCPeerConnection* pc = Initialize(scope);
// createOffer()
- pc->createOffer(scope.GetScriptState(), RTCOfferOptions::Create());
+ pc->createOffer(scope.GetScriptState(), RTCOfferOptions::Create(),
+ scope.GetExceptionState());
platform_->RunUntilIdle();
// setLocalDescription(offer)
SetNextOperationIsSuccessful(false);
- pc->setLocalDescription(scope.GetScriptState(), EmptyOffer());
+ pc->setLocalDescription(scope.GetScriptState(), EmptyOffer(),
+ scope.GetExceptionState());
platform_->RunUntilIdle();
EXPECT_EQ(OffererState::kSetLocalOfferRejected, tracker_->offerer_state());
EXPECT_EQ(CallSetupState::kFailed, tracker_->GetCallSetupState());
@@ -882,14 +888,17 @@ TEST_F(RTCPeerConnectionCallSetupStateTest,
V8TestingScope scope;
RTCPeerConnection* pc = Initialize(scope);
// createOffer()
- pc->createOffer(scope.GetScriptState(), RTCOfferOptions::Create());
+ pc->createOffer(scope.GetScriptState(), RTCOfferOptions::Create(),
+ scope.GetExceptionState());
platform_->RunUntilIdle();
// setLocalDescription(offer)
- pc->setLocalDescription(scope.GetScriptState(), EmptyOffer());
+ pc->setLocalDescription(scope.GetScriptState(), EmptyOffer(),
+ scope.GetExceptionState());
platform_->RunUntilIdle();
// setRemoteDescription(answer)
SetNextOperationIsSuccessful(false);
- pc->setRemoteDescription(scope.GetScriptState(), EmptyAnswer());
+ pc->setRemoteDescription(scope.GetScriptState(), EmptyAnswer(),
+ scope.GetExceptionState());
platform_->RunUntilIdle();
EXPECT_EQ(OffererState::kSetRemoteAnswerRejected, tracker_->offerer_state());
EXPECT_EQ(CallSetupState::kFailed, tracker_->GetCallSetupState());
@@ -932,18 +941,21 @@ TEST_F(RTCPeerConnectionCallSetupStateTest, AnswererSucceeded) {
V8TestingScope scope;
RTCPeerConnection* pc = Initialize(scope);
// setRemoteDescription(offer)
- pc->setRemoteDescription(scope.GetScriptState(), EmptyOffer());
+ pc->setRemoteDescription(scope.GetScriptState(), EmptyOffer(),
+ scope.GetExceptionState());
EXPECT_EQ(AnswererState::kSetRemoteOfferPending, tracker_->answerer_state());
EXPECT_EQ(CallSetupState::kStarted, tracker_->GetCallSetupState());
platform_->RunUntilIdle();
EXPECT_EQ(AnswererState::kSetRemoteOfferResolved, tracker_->answerer_state());
// createAnswer()
- pc->createAnswer(scope.GetScriptState(), RTCAnswerOptions::Create());
+ pc->createAnswer(scope.GetScriptState(), RTCAnswerOptions::Create(),
+ scope.GetExceptionState());
EXPECT_EQ(AnswererState::kCreateAnswerPending, tracker_->answerer_state());
platform_->RunUntilIdle();
EXPECT_EQ(AnswererState::kCreateAnswerResolved, tracker_->answerer_state());
// setLocalDescription(answer)
- pc->setLocalDescription(scope.GetScriptState(), EmptyAnswer());
+ pc->setLocalDescription(scope.GetScriptState(), EmptyAnswer(),
+ scope.GetExceptionState());
EXPECT_EQ(AnswererState::kSetLocalAnswerPending, tracker_->answerer_state());
EXPECT_EQ(CallSetupState::kStarted, tracker_->GetCallSetupState());
platform_->RunUntilIdle();
@@ -957,7 +969,8 @@ TEST_F(RTCPeerConnectionCallSetupStateTest,
RTCPeerConnection* pc = Initialize(scope);
// setRemoteDescription(offer)
SetNextOperationIsSuccessful(false);
- pc->setRemoteDescription(scope.GetScriptState(), EmptyOffer());
+ pc->setRemoteDescription(scope.GetScriptState(), EmptyOffer(),
+ scope.GetExceptionState());
platform_->RunUntilIdle();
EXPECT_EQ(AnswererState::kSetRemoteOfferRejected, tracker_->answerer_state());
EXPECT_EQ(CallSetupState::kFailed, tracker_->GetCallSetupState());
@@ -967,11 +980,13 @@ TEST_F(RTCPeerConnectionCallSetupStateTest, AnswererFailedAtCreateAnswer) {
V8TestingScope scope;
RTCPeerConnection* pc = Initialize(scope);
// setRemoteDescription(offer)
- pc->setRemoteDescription(scope.GetScriptState(), EmptyOffer());
+ pc->setRemoteDescription(scope.GetScriptState(), EmptyOffer(),
+ scope.GetExceptionState());
platform_->RunUntilIdle();
// createAnswer()
SetNextOperationIsSuccessful(false);
- pc->createAnswer(scope.GetScriptState(), RTCAnswerOptions::Create());
+ pc->createAnswer(scope.GetScriptState(), RTCAnswerOptions::Create(),
+ scope.GetExceptionState());
platform_->RunUntilIdle();
EXPECT_EQ(AnswererState::kCreateAnswerRejected, tracker_->answerer_state());
EXPECT_EQ(CallSetupState::kFailed, tracker_->GetCallSetupState());
@@ -982,14 +997,17 @@ TEST_F(RTCPeerConnectionCallSetupStateTest,
V8TestingScope scope;
RTCPeerConnection* pc = Initialize(scope);
// setRemoteDescription(offer)
- pc->setRemoteDescription(scope.GetScriptState(), EmptyOffer());
+ pc->setRemoteDescription(scope.GetScriptState(), EmptyOffer(),
+ scope.GetExceptionState());
platform_->RunUntilIdle();
// createAnswer()
- pc->createAnswer(scope.GetScriptState(), RTCAnswerOptions::Create());
+ pc->createAnswer(scope.GetScriptState(), RTCAnswerOptions::Create(),
+ scope.GetExceptionState());
platform_->RunUntilIdle();
// setLocalDescription(answer)
SetNextOperationIsSuccessful(false);
- pc->setLocalDescription(scope.GetScriptState(), EmptyAnswer());
+ pc->setLocalDescription(scope.GetScriptState(), EmptyAnswer(),
+ scope.GetExceptionState());
platform_->RunUntilIdle();
EXPECT_EQ(AnswererState::kSetLocalAnswerRejected, tracker_->answerer_state());
EXPECT_EQ(CallSetupState::kFailed, tracker_->GetCallSetupState());