Issue #2053 - Part 5: Throw a DOMException instead of a JS exception for some errors

This commit is contained in:
FranklinDM 2023-04-06 23:22:50 +08:00 committed by roytam1
commit ef8e3b5419
7 changed files with 23 additions and 8 deletions

View file

@ -195,6 +195,7 @@ CreateException(JSContext* aCx, nsresult aRv, const nsACString& aMessage)
case NS_ERROR_MODULE_DOM_ANIM:
case NS_ERROR_MODULE_DOM_PUSH:
case NS_ERROR_MODULE_DOM_MEDIA:
case NS_ERROR_MODULE_DOM_USER_TIMING:
if (aMessage.IsEmpty()) {
return DOMException::Create(aRv);
}