New issue
Advanced search Search tips

Issue 849214 link

Starred by 0 users

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Chrome , Mac , Fuchsia
Pri: 1
Type: Bug-Regression



Sign in to add a comment

CreateDOMExceptionFromRTCError crashes if webrtc::RTCErrorType::INVALID_RANGE

Project Member Reported by yukishiino@chromium.org, Jun 4 2018

Issue description

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.

 
Labels: -Type-Bug -Pri-2 Pri-1 Type-Bug-Regression
Owner: orphis@chromium.org
Status: Assigned (was: Untriaged)
Status: Started (was: Assigned)
Project Member

Comment 3 by bugdroid1@chromium.org, Jun 18 2018

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 4 by orphis@chromium.org, Jun 18 2018

Status: Fixed (was: Started)

Sign in to add a comment