| Index: third_party/WebKit/Source/modules/mediastream/MediaErrorState.cpp
|
| diff --git a/third_party/WebKit/Source/modules/mediastream/MediaErrorState.cpp b/third_party/WebKit/Source/modules/mediastream/MediaErrorState.cpp
|
| index e52cb024b24b232a91e2dc1463b408fd14639a1d..1d341df0df2ac6c1697e3c45d17dda9a0c00f195 100644
|
| --- a/third_party/WebKit/Source/modules/mediastream/MediaErrorState.cpp
|
| +++ b/third_party/WebKit/Source/modules/mediastream/MediaErrorState.cpp
|
| @@ -99,6 +99,29 @@ void MediaErrorState::raiseException(ExceptionState& target)
|
| }
|
| }
|
|
|
| +String MediaErrorState::getErrorMessage()
|
| +{
|
| + switch (m_errorType) {
|
| + case NoError:
|
| + ASSERT_NOT_REACHED();
|
| + break;
|
| + case TypeError:
|
| + case DOMError:
|
| + return m_message;
|
| + break;
|
| + case ConstraintError:
|
| + // This is for the cases where we can't pass back a
|
| + // NavigatorUserMediaError.
|
| + // So far, we have this in the constructor of RTCPeerConnection,
|
| + // which is due to be deprecated.
|
| + // TODO(hta): Remove this code. https://crbug.com/576581
|
| + return String("Unsatisfiable constraint " + m_constraint);
|
| + break;
|
| + }
|
| +
|
| + return String();
|
| +}
|
| +
|
| NavigatorUserMediaError* MediaErrorState::createError()
|
| {
|
| ASSERT(m_errorType == ConstraintError);
|
|
|