Closed
Bug 201982
Opened 22 years ago
Closed 22 years ago
nsEditProperty should not be instantiated
Categories
(Core :: DOM: Editor, defect, P2)
Tracking
()
VERIFIED
FIXED
mozilla1.4beta
People
(Reporter: alecf, Assigned: alecf)
Details
(Keywords: memory-footprint, Whiteboard: fix in hand)
Attachments
(2 files, 2 obsolete files)
|
70.45 KB,
patch
|
alecf
:
review+
sfraser_bugs
:
superreview+
|
Details | Diff | Splinter Review |
|
548 bytes,
patch
|
Brade
:
review+
sfraser_bugs
:
superreview+
|
Details | Diff | Splinter Review |
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.
| Assignee | ||
Comment 1•22 years ago
|
||
and here's the patch (finally)
looking for reviews from editor people...
| Assignee | ||
Comment 2•22 years ago
|
||
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 3•22 years ago
|
||
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 4•22 years ago
|
||
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-
| Assignee | ||
Comment 5•22 years ago
|
||
ok, here's an updated patch.. thank you perl! :)
Attachment #120752 -
Attachment is obsolete: true
| Assignee | ||
Comment 6•22 years ago
|
||
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
| Assignee | ||
Comment 7•22 years ago
|
||
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+
| Assignee | ||
Updated•22 years ago
|
Status: NEW → ASSIGNED
Priority: -- → P2
Whiteboard: fix in hand
Target Milestone: --- → mozilla1.4beta
Comment 8•22 years ago
|
||
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+
Comment 9•22 years ago
|
||
Why am I going to hate him? Merge conflicts? I *live* for merge conflicts!
| Assignee | ||
Comment 10•22 years ago
|
||
doh. Here's the fix.
| Assignee | ||
Updated•22 years ago
|
Attachment #120857 -
Flags: superreview?(sfraser)
Attachment #120857 -
Flags: review?(brade)
Comment 11•22 years ago
|
||
Comment on attachment 120857 [details] [diff] [review]
fix plaintext-editor
Assuming it still builds, sr=sfraser
Attachment #120857 -
Flags: superreview?(sfraser) → superreview+
Comment 12•22 years ago
|
||
Comment on attachment 120857 [details] [diff] [review]
fix plaintext-editor
r=brade
Attachment #120857 -
Flags: review?(brade) → review+
| Assignee | ||
Comment 13•22 years ago
|
||
oh, right. I fixed this already.
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•