Bug 1281866 - Rename gUM's SourceUnavailableError to NotReadableError.
MozReview-Commit-ID: 53703E0DLHf
--- a/dom/media/MediaManager.cpp
+++ b/dom/media/MediaManager.cpp
@@ -1189,30 +1189,30 @@ public:
nsresult rv;
if (mAudioDevice) {
rv = mAudioDevice->Allocate(GetInvariant(mConstraints.mAudio),
mPrefs, mOrigin);
if (NS_FAILED(rv)) {
LOG(("Failed to allocate audiosource %d",rv));
- Fail(NS_LITERAL_STRING("SourceUnavailableError"),
+ Fail(NS_LITERAL_STRING("NotReadableError"),
NS_LITERAL_STRING("Failed to allocate audiosource"));
return NS_OK;
}
}
if (mVideoDevice) {
rv = mVideoDevice->Allocate(GetInvariant(mConstraints.mVideo),
mPrefs, mOrigin);
if (NS_FAILED(rv)) {
LOG(("Failed to allocate videosource %d\n",rv));
if (mAudioDevice) {
mAudioDevice->GetSource()->Deallocate();
}
- Fail(NS_LITERAL_STRING("SourceUnavailableError"),
+ Fail(NS_LITERAL_STRING("NotReadableError"),
NS_LITERAL_STRING("Failed to allocate videosource"));
return NS_OK;
}
}
PeerIdentity* peerIdentity = nullptr;
if (!mConstraints.mPeerIdentity.IsEmpty()) {
peerIdentity = new PeerIdentity(mConstraints.mPeerIdentity);
}
--- a/dom/media/MediaStreamError.cpp
+++ b/dom/media/MediaStreamError.cpp
@@ -20,19 +20,18 @@ BaseMediaMgrError::BaseMediaMgrError(con
if (mMessage.IsEmpty()) {
if (mName.EqualsLiteral("NotFoundError")) {
mMessage.AssignLiteral("The object can not be found here.");
} else if (mName.EqualsLiteral("NotAllowedError")) {
mMessage.AssignLiteral("The request is not allowed by the user agent "
"or the platform in the current context.");
} else if (mName.EqualsLiteral("SecurityError")) {
mMessage.AssignLiteral("The operation is insecure.");
- } else if (mName.EqualsLiteral("SourceUnavailableError")) {
- mMessage.AssignLiteral("The source of the MediaStream could not be "
- "accessed due to a hardware error (e.g. lock from another process).");
+ } else if (mName.EqualsLiteral("NotReadableError")) {
+ mMessage.AssignLiteral("The I/O read operation failed.");
} else if (mName.EqualsLiteral("InternalError")) {
mMessage.AssignLiteral("Internal error.");
} else if (mName.EqualsLiteral("NotSupportedError")) {
mMessage.AssignLiteral("The operation is not supported.");
} else if (mName.EqualsLiteral("OverconstrainedError")) {
mMessage.AssignLiteral("Constraints could be not satisfied.");
}
}