Closed Bug 76489 Opened 24 years ago Closed 24 years ago

hp tinderbox busted

Categories

(Core :: XPCOM, defect)

HP
HP-UX
defect
Not set
blocker

Tracking

()

VERIFIED FIXED
mozilla0.9

People

(Reporter: jdunn, Assigned: jdunn)

References

Details

HP tinderbox is reporting teh following error. aCC -o nsHTMLFormControlAccessible.o -c <blah> nsHTMLFormControlAccessible.cpp Error 580: "nsHTMLFormControlAccessible.cpp", line 80 # Initialization of a variable or parameter of type 'const nsAString &' with an expression of type 'class NS_ConvertASCIItoUCS2' would require creating a temporary variable; but that cannot be done because class nsAString is abstract. (class nsAString contains or inherits at least one pure virtual function, e.g. "unsigned int nsAString::Length() const".) *_retval = ToNewUnicode(checked ? NS_LITERAL_STRING("Check") : NS_LITERAL_S gmake[3]: *** [nsHTMLFormControlAccessible.o] Error 2
Basically, HP's compiler doesn't like doing the () ? stmt1 : stmt2 when the statements require the creation of a temp and the temp is an abstract class. The fix is: Index: nsHTMLFormControlAccessible.cpp =================================================================== RCS file: /cvsroot/mozilla/accessible/src/nsHTMLFormControlAccessible.cpp,v retrieving revision 1.2 diff -u -r1.2 nsHTMLFormControlAccessible.cpp --- nsHTMLFormControlAccessible.cpp 2001/04/18 00:48:24 1.2 +++ nsHTMLFormControlAccessible.cpp 2001/04/18 14:12:46 @@ -77,7 +77,10 @@ PRBool checked = PR_FALSE; element->GetChecked(&checked); - *_retval = ToNewUnicode(checked ? NS_LITERAL_STRING("Check") : NS_LITERAL_STRING("UnCheck")); + if (checked) + *_retval = ToNewUnicode(NS_LITERAL_STRING("Check")); + else + *_retval = ToNewUnicode(NS_LITERAL_STRING("UnCheck")); return NS_OK; } Index: nsSelectAccessible.cpp =================================================================== RCS file: /cvsroot/mozilla/accessible/src/nsSelectAccessible.cpp,v retrieving revision 1.3 diff -u -r1.3 nsSelectAccessible.cpp --- nsSelectAccessible.cpp 2001/04/17 23:06:28 1.3 +++ nsSelectAccessible.cpp 2001/04/18 14:12:46 @@ -351,7 +351,10 @@ // notice its supposed to be reversed. Close if opened // and Open if closed. - *_retval = ToNewUnicode(mOpen ? NS_LITERAL_STRING("Close") : NS_LITERAL_STRING("Open")); + if (mOpen) + *_retval = ToNewUnicode(NS_LITERAL_STRING("Close")); + else + *_retval = ToNewUnicode(NS_LITERAL_STRING("Open")); } else { /*rv = nsAccessible::GetAccName(_retval);*/
Blocks: 18687
QA Contact: doronr → barrettl
Target Milestone: --- → mozilla0.9
yeah we've had this problem in other places too. scc: does your new documentation warn about this?
Component: Browser-General → XPCOM
a=roc+moz for 0.9 on behalf of drivers sr=roc+moz too if you need that
fix checked in
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
verified
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.