Build broken for nsTypeAheadFind.cpp

RESOLVED FIXED

Status

SeaMonkey
Find In Page
RESOLVED FIXED
12 years ago
10 years ago

People

(Reporter: Alfred Peng, Assigned: Alfred Peng)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

1.34 KB, patch
Aaron Leventhal
: review+
Details | Diff | Splinter Review
(Assignee)

Description

12 years ago
"nsTypeAheadFind.cpp", line 397: Error: Ambiguous "?:" expression, second operand of type "nsCOMPtr<nsISelectionController>" and third operand of type "int" can be converted to one another.
1 Error(s) detected.
gmake[1]: *** [nsTypeAheadFind.o] Error 1
(Assignee)

Comment 1

12 years ago
Created attachment 230257 [details] [diff] [review]
Patch v1
Attachment #230257 - Flags: review?(bzbarsky)
(Assignee)

Updated

12 years ago
Depends on: 344337
*getter_AddRefs(selectionController) will always be null.  Is that what we want here?

I'd think we rather want selectionController.get().

That said, I can't really review this code; I'm not a peer for the module, and don't really know the code in this file.
(Assignee)

Comment 3

12 years ago
Created attachment 230399 [details] [diff] [review]
Patch v2

(In reply to comment #2)
> *getter_AddRefs(selectionController) will always be null.  Is that what we want
> here?

hmm... null? From the following definition?
nsISupports*&
operator*()
{
  return *(mTargetSmartPtr.StartAssignment());
}
Attachment #230257 - Attachment is obsolete: true
Attachment #230399 - Flags: review?(aaronleventhal)
Attachment #230257 - Flags: review?(bzbarsky)

Comment 4

12 years ago
*** Bug 345697 has been marked as a duplicate of this bug. ***

Updated

12 years ago
Attachment #230399 - Flags: review?(aaronleventhal) → review+
StartAssignment() nulls out the pointer (after releasing the previous value, if any).  It has to; otherwise you'd leak whatever the previous value was.

Comment 6

12 years ago
This is definitely the correct patch, someone with CVS access can check in.

Also I need to remember to get this checked in on branch when bug 344337 goes in on branch.
(Assignee)

Comment 7

12 years ago
=> Please help me check in the patch. Thanks.
Whiteboard: [checkin needed]
Assignee: nobody → alfred.peng
mozilla/toolkit/components/typeaheadfind/src/nsTypeAheadFind.cpp 	1.24
Status: NEW → RESOLVED
Last Resolved: 12 years ago
Resolution: --- → FIXED
Whiteboard: [checkin needed]
Product: Core → SeaMonkey
You need to log in before you can comment on or make changes to this bug.