In assert_throws_dom_impl, the string-form branch guards against QuotaExceededError like this (current master, around L2410-2416):
} else if (typeof type === "string") {
if (name === "QuotaExceededError") {
throw new AssertionError("Test bug: QuotaExceededError needs to be tested for using assert_throws_quotaexceedederror().");
}
// ...
name = type in codename_name_map ? codename_name_map[type] : type;
The check reads name one line before name is assigned, so at that point name is undefined and the branch can never be taken. A test calling assert_throws_dom("QuotaExceededError", ...) still gets refused - but one line later, by the unrecognized-name check (QuotaExceededError was removed from name_code_map when it became its own interface), with the message Test bug: unrecognized DOMException code name or name "QuotaExceededError" ... instead of the message that points at assert_throws_quotaexceedederror().
The refusal outcome is identical either way, so no test result changes; only the diagnostic a test author sees is wrong. The numeric branch's type === 22 guard immediately above works as intended, which suggests the string branch meant to test type as well:
if (type === "QuotaExceededError") {
(or, equivalently, the guard could move below the name assignment).
Found while porting the assertion family into an embedded engine's testharness shim (sebastienros/jint#3182), where the guard was implemented over type and the divergence from the letter of upstream is documented at the call site.
In
assert_throws_dom_impl, the string-form branch guards againstQuotaExceededErrorlike this (current master, around L2410-2416):The check reads
nameone line beforenameis assigned, so at that pointnameisundefinedand the branch can never be taken. A test callingassert_throws_dom("QuotaExceededError", ...)still gets refused - but one line later, by the unrecognized-name check (QuotaExceededErrorwas removed fromname_code_mapwhen it became its own interface), with the messageTest bug: unrecognized DOMException code name or name "QuotaExceededError" ...instead of the message that points atassert_throws_quotaexceedederror().The refusal outcome is identical either way, so no test result changes; only the diagnostic a test author sees is wrong. The numeric branch's
type === 22guard immediately above works as intended, which suggests the string branch meant to testtypeas well:(or, equivalently, the guard could move below the
nameassignment).Found while porting the assertion family into an embedded engine's testharness shim (sebastienros/jint#3182), where the guard was implemented over
typeand the divergence from the letter of upstream is documented at the call site.