Replace malloc_mutex_* with class methods

RESOLVED FIXED in Firefox 58

Status

()

Core
Memory Allocator
RESOLVED FIXED
a month ago
a month ago

People

(Reporter: glandium, Assigned: glandium)

Tracking

unspecified
mozilla58
Points:
---

Firefox Tracking Flags

(firefox58 fixed)

Details

MozReview Requests

()

Submitter Diff Changes Open Issues Last Updated
Loading...
Error loading review requests:

Attachments

(1 attachment)

(Assignee)

Description

a month ago
This is preparatory work to later use RAII for mutexes.
Comment hidden (mozreview-request)

Comment 2

a month ago
mozreview-review
Comment on attachment 8919171 [details]
Bug 1409273 - Replace malloc_mutex_* with class methods.

https://reviewboard.mozilla.org/r/190082/#review195328

r=me with the issue below fixed.

::: memory/build/mozjemalloc.cpp:3900
(Diff revision 1)
>    unsigned i;
>    arena_bin_t* bin;
>    size_t prev_run_size;
>  
> -  if (malloc_mutex_init(&mLock))
> +  if (mLock.Init())
>      return true;

You inverted the sense of Mutex::Init()'s return value so you need to invert this condition. And then you could likewise invert the sense of arena_t::Init()'s return value (and its call sites!)
Attachment #8919171 - Flags: review?(n.nethercote) → review+
(Assignee)

Comment 3

a month ago
I'll leave arena_t::Init for a followup.
Comment hidden (mozreview-request)

Comment 5

a month ago
Pushed by mh@glandium.org:
https://hg.mozilla.org/integration/autoland/rev/2d93b4fb4b17
Replace malloc_mutex_* with class methods. r=njn
https://hg.mozilla.org/mozilla-central/rev/2d93b4fb4b17
Status: NEW → RESOLVED
Last Resolved: a month ago
status-firefox58: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
(Assignee)

Updated

a month ago
Blocks: 1411084
You need to log in before you can comment on or make changes to this bug.