Provide BaseAutoLock and BaseAutoUnlock deduction guides for Mutex references
Categories
(Core :: XPCOM, task)
Tracking
()
Tracking | Status | |
---|---|---|
firefox75 | --- | fixed |
People
(Reporter: sg, Assigned: sg)
References
Details
Attachments
(1 file)
The typedefs
typedef BaseAutoLock<Mutex&> MutexAutoLock;
typedef BaseAutoLock<OffTheBooksMutex&> OffTheBooksMutexAutoLock;
are no longer necessary and deduction guides can be used instead to handle any Mutex reference.
BaseAutoLock
can be renamed to MutexAutoLock
and a deduction guide
template <typename MutexType>
MutexAutoLock(MutexType&)->MutexAutoLock<MutexType&>;
be defined instead.
All uses of BaseAutoLock
and OffTheBooksMutexAutoUnlock
must be changed to refer to MutexAutoLock
in the course of this.
The same applies to BaseAutoUnlock
etc.
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 1•5 years ago
|
||
Sorry, I was mistaken about the typedefs being no longer needed, they are required for use in function signatures. But still the deduction guides should be added to allow you to write:
BaseAutoLock lock(mutexOfTemplatedType);
Assignee | ||
Comment 2•5 years ago
|
||
Depends on D64358
Comment 4•5 years ago
|
||
Backed out for build bustages on WeakRef.cpp and ThreadAnnotation.cpp.
Push with failure: https://treeherder.mozilla.org/#/jobs?repo=autoland&selectedJob=290832773&resultStatus=testfailed%2Cbusted%2Cexception&revision=b6ce0a07d782451a3fc8e58f59b3e480b4bc2cdd
Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=290832773&repo=autoland&lineNumber=57480
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=290832791&repo=autoland&lineNumber=22260
Backout: https://hg.mozilla.org/integration/autoland/rev/bf16543bd985597dd9a97840f1b6ef0badbea865
Assignee | ||
Comment 5•5 years ago
|
||
Updated patch to fix Windows and OS X builds.
Comment 7•5 years ago
|
||
bugherder |
Description
•