Bug 1581278 part 2. Add convenience methods for rejecting promises with various types of spec exceptions. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D46383
This commit is contained in:
@@ -7421,11 +7421,9 @@ already_AddRefed<Promise> HTMLMediaElement::SetSinkId(const nsAString& aSinkId,
|
||||
promise->MaybeReject(NS_ERROR_DOM_ABORT_ERR);
|
||||
break;
|
||||
case NS_ERROR_NOT_AVAILABLE: {
|
||||
ErrorResult notFoundError;
|
||||
notFoundError.ThrowDOMException(
|
||||
promise->MaybeRejectWithDOMException(
|
||||
NS_ERROR_DOM_NOT_FOUND_ERR,
|
||||
NS_LITERAL_CSTRING("The object can not be found here."));
|
||||
promise->MaybeReject(notFoundError);
|
||||
"The object can not be found here.");
|
||||
break;
|
||||
}
|
||||
case NS_ERROR_DOM_MEDIA_NOT_ALLOWED_ERR:
|
||||
|
||||
Reference in New Issue
Block a user