Closed
Bug 1280104
Opened 9 years ago
Closed 9 years ago
Use js::Mutex/js::ConditionVariable instead of PRLock/PRCondVar in js::Monitor
Categories
(Core :: JavaScript Engine, defect, P1)
Core
JavaScript Engine
Tracking
()
Tracking | Status | |
---|---|---|
firefox50 | --- | fixed |
People
(Reporter: fitzgen, Assigned: fitzgen)
References
Details
Attachments
(1 file, 1 obsolete file)
6.38 KB,
patch
|
terrence
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Assignee | ||
Comment 1•9 years ago
|
||
Attachment #8762739 -
Flags: review?(terrence)
Assignee | ||
Comment 2•9 years ago
|
||
Assignee: nobody → nfitzgerald
Status: NEW → ASSIGNED
Assignee | ||
Comment 3•9 years ago
|
||
Attachment #8762740 -
Flags: review?(terrence)
Assignee | ||
Updated•9 years ago
|
Attachment #8762739 -
Attachment is obsolete: true
Attachment #8762739 -
Flags: review?(terrence)
Assignee | ||
Comment 4•9 years ago
|
||
Updated•9 years ago
|
Comment 5•9 years ago
|
||
Comment on attachment 8762740 [details] [diff] [review]
Use js::Mutex/js::ConditionVariable instead of PRLock/PRCondVar in js::Monitor
Review of attachment 8762740 [details] [diff] [review]:
-----------------------------------------------------------------
::: js/src/vm/Monitor.cpp
@@ -19,5 @@
> - if (!condVar_)
> - return false;
> -
> - return true;
> -}
\o/
Attachment #8762740 -
Flags: review?(terrence) → review+
Updated•9 years ago
|
Iteration: 50.1 → 50.2
Updated•9 years ago
|
Whiteboard: [devtools-html]
Comment 6•9 years ago
|
||
Comment on attachment 8762740 [details] [diff] [review]
Use js::Mutex/js::ConditionVariable instead of PRLock/PRCondVar in js::Monitor
Review of attachment 8762740 [details] [diff] [review]:
-----------------------------------------------------------------
::: js/src/threading/Mutex.h
@@ +40,5 @@
> return *this;
> }
>
> + bool operator==(const Mutex& rhs) {
> + return platformData_ == rhs.platformData_;
This will probably work in practice, but it doesn't seem correct to me; there's no guarantee that the *contents* of platformData_ uniquely identifies the lock (consider an implementation that uses a spinlock - platformData_ may just be counter).
Wouldn't it be more obvious to do `return this == &rhs` or, if you insist, `return &platformData_ == &rhs.platformData_` ?
Comment 7•9 years ago
|
||
> This will probably work in practice, but it doesn't seem correct to me; there's no guarantee that the *contents* of platformData_ uniquely identifies the lock (consider an implementation that uses a spinlock - platformData_ may just be counter).
I was being dumb here - platformData_ is an array, so it already compares pointers and not contents.
Pushed by nfitzgerald@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/c9338313016a
Use js::Mutex/js::ConditionVariable instead of PRLock/PRCondVar in js::Monitor; r=terrence
Comment 9•9 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status-firefox50:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla50
Updated•8 years ago
|
Whiteboard: [devtools-html]
You need to log in
before you can comment on or make changes to this bug.
Description
•