Change return type of RtpSenderInterface::SetParameters from bool to RTCError

Note that RTCErrorTypes are mapped to the following DOMException names:
INTERNAL_ERROR -> OperationError
UNSUPPORTED_PARAMETER -> OperationError
INVALID_STATE -> InvalidStateError
INVALID_MODIFICATION -> InvalidModificationError
INVALID_RANGE -> RangeError

Bug: webrtc:8772
Change-Id: I44e3fe2456b007b8fb227d37d74b07ba226a19e4
Reviewed-on: https://webrtc-review.googlesource.com/37141
Commit-Queue: Zach Stein <zstein@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21766}
This commit is contained in:
Zach Stein
2018-01-23 15:02:36 -08:00
committed by Commit Bot
parent 3a5653af1c
commit ba37b4b075
16 changed files with 113 additions and 97 deletions

View File

@ -63,7 +63,8 @@ jboolean JNI_RtpSender_SetParameters(
}
RtpParameters parameters = JavaToNativeRtpParameters(jni, j_parameters);
return reinterpret_cast<RtpSenderInterface*>(j_rtp_sender_pointer)
->SetParameters(parameters);
->SetParameters(parameters)
.ok();
}
ScopedJavaLocalRef<jobject> JNI_RtpSender_GetParameters(