From ee8577610770a1792693355736a61178e9c3cf2c Mon Sep 17 00:00:00 2001 From: Chris Pearce Date: Tue, 30 Jun 2015 13:50:50 +1200 Subject: [PATCH] Bug 1160441 - Change exception code when MediaSource.addSourceBuffer() fails due to user disabling MP4. r=edwin --- dom/media/mediasource/MediaSource.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dom/media/mediasource/MediaSource.cpp b/dom/media/mediasource/MediaSource.cpp index fb4fdaebafa1..b8a9facf9cc1 100644 --- a/dom/media/mediasource/MediaSource.cpp +++ b/dom/media/mediasource/MediaSource.cpp @@ -100,12 +100,12 @@ IsTypeSupported(const nsAString& aType) || AndroidBridge::Bridge()->GetAPIVersion() < 16 #endif )) { - break; + return NS_ERROR_DOM_INVALID_STATE_ERR; } if ((mimeType.EqualsASCII("video/webm") || mimeType.EqualsASCII("audio/webm")) && !Preferences::GetBool("media.mediasource.webm.enabled", false)) { - break; + return NS_ERROR_DOM_INVALID_STATE_ERR; } found = true; break;