Bug 1894423 - Remove unused ExclusiveData move constructor. r=spidermonkey-reviewers,jonco

Because the constructor is actually not used, the compiler used to not
complain about it being broken. Recent changes on clang trunk made it
catch this problem without the constructor being used.

As Mutex doesn't have a move constructor, it's also not only a matter of
adding the missing underscore to lock.

As the constructor is never used, just remove it.

Differential Revision: https://phabricator.services.mozilla.com/D209108
This commit is contained in:
Mike Hommey 2024-05-01 08:05:40 +00:00
parent 6eb13cced6
commit 33cdc6655b

View File

@ -109,11 +109,6 @@ class ExclusiveData {
explicit ExclusiveData(const MutexId& id, Args&&... args)
: lock_(id), value_(std::forward<Args>(args)...) {}
ExclusiveData(ExclusiveData&& rhs)
: lock_(std::move(rhs.lock)), value_(std::move(rhs.value_)) {
MOZ_ASSERT(&rhs != this, "self-move disallowed!");
}
ExclusiveData& operator=(ExclusiveData&& rhs) {
this->~ExclusiveData();
new (mozilla::KnownNotNull, this) ExclusiveData(std::move(rhs));