Closed Bug 1258847 Opened 4 years ago Closed 4 years ago

Set PTHREAD_MUTEX_ERRORCHECK for js::Mutex in debug builds

Categories

(Core :: JavaScript Engine, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla48
Tracking Status
firefox48 --- fixed

People

(Reporter: fitzgen, Assigned: fitzgen)

Details

Attachments

(1 file, 1 obsolete file)

No description provided.
Assignee: nobody → nfitzgerald
Status: NEW → ASSIGNED
Comment on attachment 8733570 [details] [diff] [review]
Set PTHREAD_MUTEX_ERRORCHECK for js::Mutex in debug builds

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

::: js/src/threading/posix/Mutex.cpp
@@ +18,5 @@
>    if (!platformData_)
>      oom.crash("js::Mutex::Mutex");
>  
> +  int r = 0;
> +  pthread_mutexattr_t* attrp = NULL;

I think we're supposed to use nullptr now.

@@ +24,5 @@
> +#ifdef DEBUG
> +  pthread_mutexattr_t attr;
> +
> +  r = pthread_mutexattr_init(&attr);
> +  MOZ_ASSERT(r == 0);

MOZ_ALWAYS_TRUE(pthread_mutexattr_init(&attr));

and the same for the rest.
Attachment #8733570 - Flags: review?(sphink) → review+
Attachment #8733570 - Attachment is obsolete: true
https://hg.mozilla.org/mozilla-central/rev/038c00218cf4
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
You need to log in before you can comment on or make changes to this bug.