Closed Bug 271700 Opened 20 years ago Closed 19 years ago

Crash when I try to pass '@mozilla.org/messenger/progress;1' object to resgisterListener() method of the same object.

Categories

(MailNews Core :: Backend, defect)

defect
Not set
critical

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: surkov, Assigned: pythonesque+bugzilla)

Details

(Keywords: crash)

Attachments

(2 obsolete files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7) Gecko/20040616
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7) Gecko/20040616

I create object '@mozilla.org/messenger/progress;1', query nsIMsgProgress
interface, query nsIWebProgressListener interface. I try to pass
nsIWebProgressListener to registerListener() method of nsIMsgProgress.

Reproducible: Always
Steps to Reproduce:
1. var
progress=Components.classes["@mozilla.org/messenger/progress;1"].createInstance(Components.interfaces.nsIMsgProgress);
2.
progress.registerListener(progress.QueryInterface(Components.interfaces.nsIWebProgressListener));
I get exception: "Unhandled exception in mozilla.exe (MSGBASE.DLL): 0xC00000FD:
Stack Overflow."
This has nothing to do with XPCOM.  It's just a bug in the mailnews code...  It
should throw if |this| is passed in.
Assignee: dougt → sspitzer
Status: UNCONFIRMED → NEW
Component: XPCOM → MailNews: Backend
Ever confirmed: true
Keywords: crash, helpwanted
OS: Windows 2000 → All
Hardware: PC → All
Whiteboard: [good first bug]
why is this not a bug in the caller, which passes a listener in which it shouldn't?
Because the callee shouldn't crash anyway....  (General "calls from JS should
not crash us" principle).
Summary: Crach when I try to pass '@mozilla.org/messenger/progress;1' object to resgisterListener() method of the same object. → Crash when I try to pass '@mozilla.org/messenger/progress;1' object to resgisterListener() method of the same object.
Attached patch Proposed Patch (obsolete) — Splinter Review
Requesting review.  This being the first bug I've attempted to submit, I don't
know if there's something else I'm supposed to do at this point.
Attachment #184862 - Flags: review?(cbiesinger)
Comment on attachment 184862 [details] [diff] [review]
Proposed Patch

I'm not a mailnews peer...

also, is the call here really necessary?
Attachment #184862 - Flags: review?(cbiesinger) → review?(bienvenu)
Attached patch Proposed Patch v1.1 (obsolete) — Splinter Review
Sorry about that... I should, in retrospect, have ensured that the comment was
done properly.	Also, I assume that pointer conversion is unnecessary in this
case.
Attachment #184862 - Attachment is obsolete: true
Attachment #184865 - Flags: review?(cbiesinger)
(In reply to comment #6)
> (From update of attachment 184862 [details] [diff] [review] [edit])
> I'm not a mailnews peer...
> 
> also, is the call here really necessary?
> 

Oh, sorry.  I didn't see your comment.  On that note, what do you mean by 'is
the call here really necessary'?  Keep in mind that I have no prior experience
in this, and as such my expertise is limited.
Comment on attachment 184865 [details] [diff] [review]
Proposed Patch v1.1

And... fixing the requestee.  Again, I apologize.
Attachment #184865 - Flags: review?(cbiesinger) → review?(bienvenu)
bah, did I write "call"? I meant to write "cast", sorry. but I see that you
already removed it :-)
Comment on attachment 184865 [details] [diff] [review]
Proposed Patch v1.1

seems ok, thx.
Attachment #184865 - Flags: review?(bienvenu) → review+
Attachment #184865 - Flags: approval1.8b2?
Attachment #184865 - Flags: approval1.8b2? → superreview?(dmose)
Comment on attachment 184865 [details] [diff] [review]
Proposed Patch v1.1

sr=dmose
Attachment #184865 - Flags: superreview?(dmose) → superreview+
Attachment #184865 - Flags: approval1.8b3?
Comment on attachment 184865 [details] [diff] [review]
Proposed Patch v1.1

a=me for 1.8b3.

/be
Attachment #184865 - Flags: approval1.8b3? → approval1.8b3+
Assignee: sspitzer → pythonesque+bugzilla
Comment on attachment 184865 [details] [diff] [review]
Proposed Patch v1.1

mozilla/mailnews/base/src/nsMsgProgress.cpp	1.20
Attachment #184865 - Attachment is obsolete: true
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Keywords: crash, helpwanted
Whiteboard: [good first bug]
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: