Closed Bug 286727 Opened 20 years ago Closed 8 years ago

DecodeStructParticle doesn't understand nsSupportsArray::RemoveElement

Categories

(Core Graveyard :: Web Services, defect)

x86
Windows XP
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: timeless, Assigned: doronr)

References

()

Details

http://lxr.mozilla.org/seamonkey/source/xpcom/ds/nsVoidArray.h#116
116   PRBool RemoveElementsAt(PRInt32 aIndex, PRInt32 aCount);
117   PRBool RemoveElementAt(PRInt32 aIndex) { return RemoveElementsAt(aIndex,1); }

2260                 rc = all->RemoveElementAt(i);
2262                 if (NS_FAILED(rc))
2263                   return rc;
Doron, this is pretty major (this function will bail out on _success_, not
failure).  Got time to fix?
So the problem is the method returns a PRBool but the code is assuming NS_*, right? 
Assignee: web-services → doronr
Yes.  The return value on success will be 1, which will test true for NS_FAILED
and false for NS_SUCCEEDED (since NS_OK == 0).
fwiw 0 and 1 are both success codes, failure codes require the MSB bit set.
QA Contact: doronr → web-services
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → INVALID
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.