Closed Bug 808856 Opened 12 years ago Closed 10 years ago

Make not overriding WrapObject fail to build

Categories

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

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla35

People

(Reporter: ehsan.akhgari, Assigned: peterv)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

I keep on forgetting to override WrapObject, and I get non-obvious runtime assertions.  It's much better if we make WrapObject pure virtual and fail this mistake to build.
I've tried this before, but not all of nsWrapperCache's subclasses override WrapObject; in particular some of nsDOMEventTargetHelper's subclasses. (This case in particular can be solved by implementing a no-op WrapObject on nsDOMEventTargetHelper, I guess.)
Yeah that would make sense I think.
Attached patch v1Splinter Review
Assignee: nobody → peterv
Status: NEW → ASSIGNED
Attachment #8500556 - Flags: review?(ehsan.akhgari)
Attachment #8500556 - Flags: review?(ehsan.akhgari) → review+
https://hg.mozilla.org/mozilla-central/rev/b2238670c5bf
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla35
Flags: qe-verify-
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.