Closed Bug 506680 Opened 15 years ago Closed 15 years ago

"redeclaration of property..." (x3) in editor/ui/composer/content/ComposerCommands.js

Categories

(MailNews Core :: Composition, defect)

defect
Not set
normal

Tracking

(Not tracked)

VERIFIED DUPLICATE of bug 371174

People

(Reporter: philip.chee, Unassigned)

Details

Warning: redeclaration of property promptPassword Source file: chrome://editor/content/ComposerCommands.js Line: 1467 ---------- Warning: redeclaration of property promptUsernameAndPassword Source file: chrome://editor/content/ComposerCommands.js Line: 1459 ---------- Warning: redeclaration of property prompt Source file: chrome://editor/content/ComposerCommands.js Line: 1445 The two declarations of promptPassword each declare different parameters. Ditto for the other two functions. I don't see how this could have worked, except that these methods don't seem to be used at all.
CVS archaeology indicates these three functions were checked in already duplicated in Bug 28792. The patch had sr+ from hewitt too! I don't see how this code could have worked.
> QueryInterface : function(aIID) > { > if (aIID.equals(Components.interfaces.nsIWebProgressListener) > || aIID.equals(Components.interfaces.nsISupports) > || aIID.equals(Components.interfaces.nsISupportsWeakReference) > || aIID.equals(Components.interfaces.nsIPrompt) > || aIID.equals(Components.interfaces.nsIAuthPrompt)) So they want to implement both nsIPrompt and nsIAuthPrompt but these have the same method names with differing function signatures. Apparently the original author thought that you could do function overloading this way in Javascript.
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → DUPLICATE
V.Duplicate
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.