Closed Bug 1237230 Opened 4 years ago Closed 4 years ago

Fix Vector MOZ_WARN_UNUSED_RESULT warnings

Categories

(Core :: js-ctypes, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla46
Tracking Status
firefox46 --- fixed

People

(Reporter: jandem, Assigned: jandem)

References

Details

Attachments

(1 file)

Attached patch PatchSplinter Review
In bug 1237201 I'm trying to mark the fallible Vector methods MOZ_WARN_UNUSED_RESULT.

Jason, the OOM checks in js/src/ctypes are a bit of a mess. There are many calls to str->ensureLinear(cx) etc in void functions that just "return;" on failure.

So for these Vector methods i did the same. I can file a follow-up bug to clean this up, but I'd like to focus on bug 1237201 first: as long as we don't fix that it's a moving target.
Attachment #8704570 - Flags: review?(jorendorff)
(In reply to Jan de Mooij [:jandem] from comment #0)
> So for these Vector methods i did the same. I can file a follow-up bug to
> clean this up,

I guess another option is MOZ_CRASH...
Comment on attachment 8704570 [details] [diff] [review]
Patch

Review of attachment 8704570 [details] [diff] [review]:
-----------------------------------------------------------------

Yuck.
Attachment #8704570 - Flags: review?(jorendorff) → review+
https://hg.mozilla.org/mozilla-central/rev/418796e4d8de
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla46
You need to log in before you can comment on or make changes to this bug.