Fed up with self-hosted code that mistakenly (and non-obviously) threw an Error instead of the specified RangeError, I just added two new self-hosting intrinsics: ThrowRangeError and ThrowTypeError[0]. They're exactly identical to the current ThrowError *except* that they assert if the provided error number doesn't have the requested error type.
Given these names are clearly better than ThrowError, ThrowError is deprecated; reviewers should reject patches that use it. I converted a handful of ThrowError uses as a smoketest when landing the new methods, but I lacked time to complete the conversion with due diligence toward verifying the existing, error-prone code's correctness. Help doing so in bug 1155081 is greatly appreciated. Jeff 0. Nothing against ReferenceError, SyntaxError, EvalError, or URIError, but we don't have any self-hosted users yet. We can add their intrinsics as users arise. _______________________________________________ dev-tech-js-engine-internals mailing list dev-tech-js-engine-internals@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-tech-js-engine-internals