Closed
Bug 248705
Opened 20 years ago
Closed 20 years ago
nsIWebProgress.addProgressListener documentation is wrong
Categories
(Core Graveyard :: Embedding: APIs, defect)
Core Graveyard
Embedding: APIs
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: timeless, Assigned: darin.moz)
References
()
Details
The documentation says:
77 * NS_INVALID_ARG - The listener passed in was
either nsnull,
78 * or was already registered with
this progress
79 * interface.
80 */
81 rpotts 1.8 void addProgressListener(in nsIWebProgressListener listener,
82 in unsigned long aNotifyMask);
the code
http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/uriloader/base/nsDocLoader.cpp&rev=3.272&mark=886-887,891-892,897-898#885
does:
886 rpotts 3.253 nsDocLoaderImpl::AddProgressListener(nsIWebProgressListener
*aListener,
887 PRUint32 aNotifyMask)
888 mscott 3.196 {
889 rpotts 3.206 nsresult rv;
890 jaggernaut 3.263 nsWeakPtr listener = do_GetWeakReference(aListener);
891 rpotts 3.253 if (!listener) {
892 return NS_ERROR_INVALID_ARG;
893 }
894 valeski 3.224
895 rpotts 3.253 nsListenerInfo* info = GetListenerInfo(listener);
896 if (info) {
897 // The listener is already registered!
898 return NS_ERROR_FAILURE;
899 }
And note that NS_INVALID_ARG doesn't exist.
further, this should probably be a throws not a return.
Assignee | ||
Comment 1•20 years ago
|
||
this documentation was fixed along with my patch for bug 99639.
Assignee: adamlock → darin
Assignee | ||
Comment 2•20 years ago
|
||
marking FIXED
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Updated•6 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•