Closed Bug 947064 Opened 6 years ago Closed 5 years ago
DOMError claims to have constant members, but doesn't
Bug 883178 added a setter for name/message on DOMError but left them annotated as [Constant]. That seems broken. Seems to me like we should add some sort of boolean flag that ignores calls to init() after either getter has been called, if we really want to keep that [Constant] promise. Or change to [Pure] if these aren't really constant. But what we shouldn't do is lie to the JIT like this; that's a recipe for disaster.
Ugh, I missed the fact that the are [Constant] annotations. And in general I don't see the purpose of having the DOMError.init method given that we have a constructor. In the longer term I've been hoping that we could get rid of DOMError in favor of simply using DOMException (or subclasses thereof) everywhere. But that's a bigger project.
(In reply to Jonas Sicking (:sicking) from comment #1) > Ugh, I missed the fact that the are [Constant] annotations. And in general I > don't see the purpose of having the DOMError.init method given that we have > a constructor. > The reasons for adding DOMError.init was to allow JS code to inherit from DOMError. https://bugzilla.mozilla.org/show_bug.cgi?id=883178#c15 https://bugzilla.mozilla.org/show_bug.cgi?id=883178#c41
Assignee: nobody → ferjmoreno
OS: Mac OS X → All
Hardware: x86 → All
Are you going to fix
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1081810
> Are you going to fix Fix which?
Nothing; forgot to remove that line after realizing the init() method was gone and duping.
You need to log in before you can comment on or make changes to this bug.