mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-20 16:55:40 +00:00
|this|-qualify a couple calls to |Cell::is| inside Cell template member functions, because some gcc trips and falls when asked to compile them (possibly because the |is|-call appears inside a decltype?). No bug, r=multiple-bustage-reports-from-treeherder-and-bz
--HG-- extra : rebase_source : 8a2f2096684d25541be63490e722e8b1d5910c9f
This commit is contained in:
parent
fc7dc7e60e
commit
00468f1caf
@ -83,12 +83,16 @@ struct Cell
|
||||
|
||||
template<class T>
|
||||
inline T* as() {
|
||||
// |this|-qualify the |is| call below to avoid compile errors with even
|
||||
// fairly recent versions of gcc, e.g. 7.1.1 according to bz.
|
||||
MOZ_ASSERT(this->is<T>());
|
||||
return static_cast<T*>(this);
|
||||
}
|
||||
|
||||
template <class T>
|
||||
inline const T* as() const {
|
||||
// |this|-qualify the |is| call below to avoid compile errors with even
|
||||
// fairly recent versions of gcc, e.g. 7.1.1 according to bz.
|
||||
MOZ_ASSERT(this->is<T>());
|
||||
return static_cast<const T*>(this);
|
||||
}
|
||||
@ -147,13 +151,17 @@ class TenuredCell : public Cell
|
||||
|
||||
template<class T>
|
||||
inline T* as() {
|
||||
MOZ_ASSERT(is<T>());
|
||||
// |this|-qualify the |is| call below to avoid compile errors with even
|
||||
// fairly recent versions of gcc, e.g. 7.1.1 according to bz.
|
||||
MOZ_ASSERT(this->is<T>());
|
||||
return static_cast<T*>(this);
|
||||
}
|
||||
|
||||
template <class T>
|
||||
inline const T* as() const {
|
||||
MOZ_ASSERT(is<T>());
|
||||
// |this|-qualify the |is| call below to avoid compile errors with even
|
||||
// fairly recent versions of gcc, e.g. 7.1.1 according to bz.
|
||||
MOZ_ASSERT(this->is<T>());
|
||||
return static_cast<const T*>(this);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user