Chromium Code Reviews| 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; |
|
yhirano
2016/02/10 18:13:22
Is this "break" needed?
Guido Urdaneta
2016/02/10 20:21:28
Done.
|
| + 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); |
|
yhirano
2016/02/10 18:13:22
return "Unsatisfiable constant" + m_constraint;
Guido Urdaneta
2016/02/10 20:21:28
Done.
|
| + break; |
|
yhirano
2016/02/10 18:13:22
ditto
Guido Urdaneta
2016/02/10 20:21:28
Done.
|
| + } |
| + |
| + return String(); |
| +} |
| + |
| NavigatorUserMediaError* MediaErrorState::createError() |
| { |
| ASSERT(m_errorType == ConstraintError); |