Closed Bug 1165729 Opened 7 years ago Closed 7 years ago
Capacity return value in ns SMILAnimation Function::Get Values
No description provided.
Comment on attachment 8606756 [details] [diff] [review] Check SetCapacity return value in nsSMILAnimationFunction::GetValues Looks like |result| (the thing we're calling SetCapacity on) is indeed a typedef for FallibleTArray, ever since bug 937614 landed and changed that typedef. So yeah, we should be error-checking this SetCapacity call. Thanks for noticing this! (Out of curiosity, how did you run across this? By auditing calls to SetCapacity & looking if they're on fallible vs. infallible arrays?)
Attachment #8606756 - Flags: review?(dholbert) → review+
(In reply to Daniel Holbert [:dholbert] from comment #2) > (Out of curiosity, how did you run across this? By auditing calls to > SetCapacity & looking if they're on fallible vs. infallible arrays?) For bug 968520, I'm running a Clang AST matcher to automatically find and add `mozilla::fallible` to calls that use the fallible allocator. I noticed this while doing that. (After bug 968520 lands, the compiler will emit a -Wunused-result warning for code like this!)
(In reply to Pulsebot from comment #11) > https://hg.mozilla.org/integration/mozilla-inbound/rev/e7061b445ad7 This had the wrong bug number (again...), but I won't bother relanding it since it's a trivial patch. Please ignore and sorry for the bugmail spam.
(In reply to Birunthan Mohanathas [:poiru] from comment #12) > This had the wrong bug number (again...), but I won't bother relanding it > since it's a trivial patch. Please ignore and sorry for the bugmail spam. For future reference, the correct bug is bug 968520.
You need to log in before you can comment on or make changes to this bug.