CreateDOMExceptionFromRTCError crashes in case of webrtc::RTCErrorType::INVALID_RANGE. https://cs.chromium.org/chromium/src/third_party/blink/renderer/modules/peerconnection/rtc_error_util.cc?l=38&rcl=d4dc778de21c0585c815ccf469c40196317c4be2 DOMException::Create does not handle non-DOMException exception code such as kV8RangeError. This falls into nullptr of type CoreException*, and crashes.
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/12b476b0aea248e33d798aa23153e628cbff3f19 commit 12b476b0aea248e33d798aa23153e628cbff3f19 Author: Florent Castelli <orphis@chromium.org> Date: Mon Jun 18 11:59:25 2018 Properly translate RTCError objects to DOMException or RangeError RangeErrors are not DOMException and the function we used to translate them to DOMException couldn't handle anything else. Using an ExceptionState, we can properly reject the promises with the right type of exception. Bug: 849214 Change-Id: I14ad11ba43910a83770d66c6976509c0feba3408 Reviewed-on: https://chromium-review.googlesource.com/1097325 Commit-Queue: Florent Castelli <orphis@chromium.org> Reviewed-by: Henrik Boström <hbos@chromium.org> Reviewed-by: Yuki Shiino <yukishiino@chromium.org> Cr-Commit-Position: refs/heads/master@{#567979} [modify] https://crrev.com/12b476b0aea248e33d798aa23153e628cbff3f19/third_party/WebKit/LayoutTests/external/wpt/webrtc/RTCPeerConnection-addIceCandidate-expected.txt [modify] https://crrev.com/12b476b0aea248e33d798aa23153e628cbff3f19/third_party/WebKit/LayoutTests/external/wpt/webrtc/RTCPeerConnection-setLocalDescription-pranswer-expected.txt [modify] https://crrev.com/12b476b0aea248e33d798aa23153e628cbff3f19/third_party/WebKit/LayoutTests/virtual/webrtc-wpt-unified-plan/external/wpt/webrtc/RTCPeerConnection-setLocalDescription-answer-expected.txt [modify] https://crrev.com/12b476b0aea248e33d798aa23153e628cbff3f19/third_party/blink/renderer/modules/peerconnection/rtc_error_util.cc [modify] https://crrev.com/12b476b0aea248e33d798aa23153e628cbff3f19/third_party/blink/renderer/modules/peerconnection/rtc_error_util.h [modify] https://crrev.com/12b476b0aea248e33d798aa23153e628cbff3f19/third_party/blink/renderer/modules/peerconnection/rtc_peer_connection.cc [modify] https://crrev.com/12b476b0aea248e33d798aa23153e628cbff3f19/third_party/blink/renderer/modules/peerconnection/rtc_rtp_sender.cc [modify] https://crrev.com/12b476b0aea248e33d798aa23153e628cbff3f19/third_party/blink/renderer/modules/peerconnection/rtc_session_description_request_promise_impl.cc [modify] https://crrev.com/12b476b0aea248e33d798aa23153e628cbff3f19/third_party/blink/renderer/modules/peerconnection/rtc_session_description_request_promise_impl.h [modify] https://crrev.com/12b476b0aea248e33d798aa23153e628cbff3f19/third_party/blink/renderer/modules/peerconnection/rtc_void_request_promise_impl.cc [modify] https://crrev.com/12b476b0aea248e33d798aa23153e628cbff3f19/third_party/blink/renderer/modules/peerconnection/rtc_void_request_promise_impl.h [modify] https://crrev.com/12b476b0aea248e33d798aa23153e628cbff3f19/third_party/blink/renderer/modules/peerconnection/rtc_void_request_script_promise_resolver_impl.cc [modify] https://crrev.com/12b476b0aea248e33d798aa23153e628cbff3f19/third_party/blink/renderer/modules/peerconnection/rtc_void_request_script_promise_resolver_impl.h
Comment 1 by guidou@chromium.org
, Jun 4 2018Owner: orphis@chromium.org
Status: Assigned (was: Untriaged)