Closed Bug 306900 Opened 19 years ago Closed 19 years ago

[FIX]nsDocument::StartDocumentLoad must not leave aDocListener untouched

Categories

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

defect

Tracking

()

RESOLVED FIXED
mozilla1.9alpha1

People

(Reporter: timeless, Assigned: bzbarsky)

References

()

Details

Attachments

(1 file)

/* interface foo : nsISupports { nsISupports bar(); void baz(out nsISupports
bip); } */
class Foo : public foo {
nsresult Bar(nsISupports **ign){ return 0;}
nsresult Baz(nsISupports **ign){ return 0;}
}

<shaver> both are bogus
<shaver> for not guaranteeing the state of *ign
Version: 1.8 Branch → Trunk
this is a pure virtual function, subclasses are supposed to fill in aDocListener...
Yeah, we never actually have an nsDocument instance around, so this is just a
non-issue, I think.
I'm going to mark this invalid.  This is never called by anyone but subclasses, and they're the ones responsible for creating a listener.  I suppose we could rename this DoStartDocumentLoad and remove that param altogether, but that doesn't seem worth it...
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → INVALID
we could make it a pure virtual function (with an implementation), to ensure that all subclasses have to override it.
Hmm... Is it possible to have a pure virtual function that still has an impl?  If so, great -- this becomes something like a 3-character fix, right?
yes, it is.
Status: RESOLVED → REOPENED
Resolution: INVALID → ---
Assignee: general → bzbarsky
Status: REOPENED → ASSIGNED
Attachment #209212 - Flags: superreview?(jst)
Attachment #209212 - Flags: review?(jst)
OS: Windows XP → All
Priority: -- → P3
Hardware: PC → All
Summary: nsDocument::StartDocumentLoad must not leave aDocListener untouched → [FIX]nsDocument::StartDocumentLoad must not leave aDocListener untouched
Target Milestone: --- → mozilla1.9alpha
Comment on attachment 209212 [details] [diff] [review]
Do the virtual thing

r+sr=jst
Attachment #209212 - Flags: superreview?(jst)
Attachment #209212 - Flags: superreview+
Attachment #209212 - Flags: review?(jst)
Attachment #209212 - Flags: review+
Fixed.
Status: ASSIGNED → RESOLVED
Closed: 19 years ago19 years ago
Resolution: --- → FIXED
Component: DOM: Core → DOM: Core & HTML
QA Contact: ian → general
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: