Typo in nsHTMLInputElement::HandleDOMEvent

VERIFIED FIXED in M18

Status

()

Core
Editor
P3
normal
VERIFIED FIXED
18 years ago
17 years ago

People

(Reporter: Heikki Toivonen (remove -bugzilla when emailing directly), Assigned: Simon Fraser)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [nsbeta3+])

Look at this line:

  if (formControlFrame && 
NS_SUCCEEDED(formControlFrame->QueryInterface(kIFrameIID, (void **)&formFrame) 
&& formFrame))

Visual C++ compiler says this line is nonsense, and I agree. It looks like a 
closing parenthesis is in a wrong place, i.e. move the last closing parenthesis 
to before the last '&&'. And actually, according to COM, QI MUST ALWAYS set the 
outgoing pointer to null if the interface is not supported so the last null 
check is redundant.

I didn't just go and fix this 'cos I do not know how to actually test if it 
works or breaks something... The code is wrong in any case, and must be fixed.
Nominating for nsbeta3. Trivial fix.
Keywords: correctness, nsbeta3
(Assignee)

Comment 2

18 years ago
beppe: please + this. It's a trivial fix.
Status: NEW → ASSIGNED

Comment 3

18 years ago
it's nsbeta3+
Whiteboard: [nsbeta3+]
Target Milestone: --- → M18
(Assignee)

Comment 4

18 years ago
Fix checked into 

nsHTMLInputElement.cpp
nsHTMLOptGroupElement.cpp
nsHTMLSelectElement.cpp
nsHTMLTextAreaElement.cpp
Status: ASSIGNED → RESOLVED
Last Resolved: 18 years ago
Resolution: --- → FIXED

Comment 5

18 years ago
marking verified.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.