hp tinderbox busted

VERIFIED FIXED in mozilla0.9

Status

()

Core
XPCOM
--
blocker
VERIFIED FIXED
17 years ago
17 years ago

People

(Reporter: Jim Dunn, Assigned: Jim Dunn)

Tracking

Trunk
mozilla0.9
HP
HP-UX
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Assignee)

Description

17 years ago
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
(Assignee)

Comment 1

17 years ago
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

Comment 2

17 years ago
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
(Assignee)

Comment 4

17 years ago
fix checked in
Status: NEW → RESOLVED
Last Resolved: 17 years ago
Resolution: --- → FIXED

Comment 5

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