RemoveElement will crash when the element is not found. It compares the result of IndexOf with >= 0, but the type is UInt, so it will always be true. You want to compare it to NoIndex to test for failure. Testcase: nsTArray<int> foo; foo.RemoveElement(5); I'd fix this myself but I'm unsure what branches this would need to be checked into, etc.
No worries. I've got it.
Severity: normal → critical
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla1.9alpha
Created attachment 209921 [details] [diff] [review] v1 patch
Status: ASSIGNED → RESOLVED
Last Resolved: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.