Closed Bug 201982 Opened 22 years ago Closed 22 years ago

nsEditProperty should not be instantiated

Categories

(Core :: DOM: Editor, defect, P2)

PowerPC
macOS
defect

Tracking

()

VERIFIED FIXED
mozilla1.4beta

People

(Reporter: alecf, Assigned: alecf)

Details

(Keywords: memory-footprint, Whiteboard: fix in hand)

Attachments

(2 files, 2 obsolete files)

I just found the most absurd thing - nsEditProperty is a concrete class that implements the empty interface nsIEditProperty, and has no methods of its own.. nsIEditProperty has tons of static atom members though. In any case, nobody needs to instantiate this class, we should just be doing atom initialization when the dll is loaded. Patch forthcoming.
Attached patch stop instantiating this! (obsolete) — Splinter Review
and here's the patch (finally) looking for reviews from editor people...
Comment on attachment 120752 [details] [diff] [review] stop instantiating this! brade/kin - lots of code cleanup here, but its pretty straight forward - mostly just removal
Attachment #120752 - Flags: superreview?(kin)
Attachment #120752 - Flags: review?(brade)
Comment on attachment 120752 [details] [diff] [review] stop instantiating this! r=brade Kin is on vacation so requesting Simon's superreview
Attachment #120752 - Flags: superreview?(sfraser)
Attachment #120752 - Flags: superreview?(kin)
Attachment #120752 - Flags: review?(brade)
Attachment #120752 - Flags: review+
Comment on attachment 120752 [details] [diff] [review] stop instantiating this! >Index: base/nsIEditProperty.h >=================================================================== >RCS file: /cvsroot/mozilla/editor/libeditor/base/nsIEditProperty.h,v >retrieving revision 1.29 >diff -u -r1.29 nsIEditProperty.h >--- base/nsIEditProperty.h 10 Apr 2003 21:04:03 -0000 1.29 >+++ base/nsIEditProperty.h 16 Apr 2003 21:17:26 -0000 >@@ -54,22 +54,18 @@ > * > */ > >-class nsIEditProperty : public nsISupports >+class nsIEditProperty I'd rather you killed nsIEditProperty.h and kept nsEditProperty.h around. This isn't an inteface class, so nsEditProperty is a better name. >Index: html/nsEditProperty.cpp >=================================================================== >-nsEditProperty::nsEditProperty() >+void >+nsIEditProperty::RegisterAtoms() Make this nsEditProperty::RegisterAtoms(). >Index: html/nsEditProperty.h >=================================================================== Keep this file (see above). One more round please!
Attachment #120752 - Flags: superreview?(sfraser) → superreview-
Attached patch stop instantiating this v1.1 (obsolete) — Splinter Review
ok, here's an updated patch.. thank you perl! :)
Attachment #120752 - Attachment is obsolete: true
oops, that broke on a clobber. this time I put nsEditProperty.h back into libeditor/base, where the old nsIEditProperty was to begin with.
Attachment #120761 - Attachment is obsolete: true
Comment on attachment 120763 [details] [diff] [review] stop instantiating this v1.11 ok, here's an updated patch. perl did most of the work for me in substituting nsEditProperty for nsIEditProperty note that nsEditProperty.h is not a new file, it was just moved from nsIEditProperty.h carrying over r=brade and asking simon's sr
Attachment #120763 - Flags: superreview?(sfraser)
Attachment #120763 - Flags: review+
Status: NEW → ASSIGNED
Priority: -- → P2
Whiteboard: fix in hand
Target Milestone: --- → mozilla1.4beta
Comment on attachment 120763 [details] [diff] [review] stop instantiating this v1.11 Ugh, so many callers! >Index: base/nsEditProperty.h >=================================================================== >+#define NS_IEDITPROPERTY_IID \ >+{/* 9875cd40-ca81-11d2-8f4d-006008159b0c*/ \ >+0x9875cd40, 0xca81, 0x11d2, \ >+{0x8f, 0x4d, 0x0, 0x60, 0x8, 0x15, 0x9b, 0x0c} } No need for this any more, right? The rest looks fine, as long as it builds and runs. Joe is going to hate you :)
Attachment #120763 - Flags: superreview?(sfraser) → superreview+
Why am I going to hate him? Merge conflicts? I *live* for merge conflicts!
doh. Here's the fix.
Attachment #120857 - Flags: superreview?(sfraser)
Attachment #120857 - Flags: review?(brade)
Comment on attachment 120857 [details] [diff] [review] fix plaintext-editor Assuming it still builds, sr=sfraser
Attachment #120857 - Flags: superreview?(sfraser) → superreview+
Comment on attachment 120857 [details] [diff] [review] fix plaintext-editor r=brade
Attachment #120857 - Flags: review?(brade) → review+
oh, right. I fixed this already.
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
rs vrfy.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: