Fix Vector MOZ_WARN_UNUSED_RESULT warnings

RESOLVED FIXED in Firefox 46

Status

()

Core
js-ctypes
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: jandem, Assigned: jandem)

Tracking

unspecified
mozilla46
Points:
---

Firefox Tracking Flags

(firefox46 fixed)

Details

Attachments

(1 attachment)

(Assignee)

Description

2 years ago
Created attachment 8704570 [details] [diff] [review]
Patch

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)
(Assignee)

Comment 1

2 years ago
(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+

Comment 4

2 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/418796e4d8de
Status: ASSIGNED → RESOLVED
Last Resolved: 2 years ago
status-firefox46: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla46
You need to log in before you can comment on or make changes to this bug.