|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:
Jeff Walden 2018-03-09 23:16:03 -08:00
parent fc7dc7e60e
commit 00468f1caf

View File

@ -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);
}