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

@ -54,7 +54,7 @@ already_AddRefed<PerformanceMark> PerformanceMark::Constructor(
if (performance->IsGlobalObjectWindow() &&
performance->IsPerformanceTimingAttribute(aMarkName)) {
aRv.ThrowTypeError<MSG_PMO_INVALID_TIMING_ATTR>();
aRv.Throw(NS_ERROR_DOM_UT_INVALID_TIMING_ATTR);
return nullptr;
}