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..e3f895d14665b87ad91a652c6d617af45c52dbc1 100644 |
--- a/third_party/WebKit/Source/modules/mediastream/MediaErrorState.cpp |
+++ b/third_party/WebKit/Source/modules/mediastream/MediaErrorState.cpp |
@@ -99,6 +99,27 @@ void MediaErrorState::raiseException(ExceptionState& target) |
} |
} |
+String MediaErrorState::getErrorMessage() |
+{ |
+ switch (m_errorType) { |
+ case NoError: |
+ ASSERT_NOT_REACHED(); |
+ break; |
+ case TypeError: |
+ case DOMError: |
philipj_slow
2016/02/15 10:22:21
Also s/DOMError/DOMException/ here?
Guido Urdaneta
2016/02/15 16:56:51
Done.
|
+ return m_message; |
+ 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 "Unsatisfiable constraint " + m_constraint; |
haraken
2016/02/13 15:07:18
Shall we add:
default:
ASSERT_NOT_REACHED()
Guido Urdaneta
2016/02/15 16:56:51
Done.
|
+ } |
+ |
+ return String(); |
+} |
+ |
NavigatorUserMediaError* MediaErrorState::createError() |
{ |
ASSERT(m_errorType == ConstraintError); |