Closed Bug 947064 Opened 11 years ago Closed 10 years ago

DOMError claims to have constant members, but doesn't

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1081810

People

(Reporter: bzbarsky, Assigned: ferjm)

References

Details

(Keywords: regression)

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.
Flags: needinfo?(jonas)
Keywords: regression
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.
Flags: needinfo?(jonas)
(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: 10 years ago
Resolution: --- → DUPLICATE
> Are you going to fix Fix which?
Flags: needinfo?(Ms2ger)
Nothing; forgot to remove that line after realizing the init() method was gone and duping.
Flags: needinfo?(Ms2ger)
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.