Issue #1679 - Part 2: Some small issues to address buildability.

- Explicitly |this| the Asserts in Cell.as<>
- Unified deprot in regexp-error.h
- Convert RegExpShared* inner() to a reinterpret_cast because for SOME reason
  .as<> no longer works after the reimport (which is a static cast)
This commit is contained in:
Moonchild 2020-11-12 11:58:39 +00:00 • committed by roytam1
commit 87982cb409
3 changed files with 4 additions and 3 deletions

View file

@ -280,13 +280,13 @@ struct Cell
template<class T> template<class T>
inline T* as() { inline T* as() {
MOZ_ASSERT(is<T>()); MOZ_ASSERT(this->is<T>());
return static_cast<T*>(this); return static_cast<T*>(this);
} }
template <class T> template <class T>
inline const T* as() const { inline const T* as() const {
MOZ_ASSERT(is<T>()); MOZ_ASSERT(this->is<T>());
return static_cast<const T*>(this); return static_cast<const T*>(this);
} }

View file

@ -5,6 +5,7 @@
#ifndef V8_REGEXP_REGEXP_ERROR_H_ #ifndef V8_REGEXP_REGEXP_ERROR_H_
#define V8_REGEXP_REGEXP_ERROR_H_ #define V8_REGEXP_REGEXP_ERROR_H_
#include "regexp-shim.h"
namespace v8 { namespace v8 {
namespace internal { namespace internal {

View file

@ -957,7 +957,7 @@ class JSRegExp : public HeapObject {
private: private:
js::RegExpShared* inner() { js::RegExpShared* inner() {
return value_.toGCThing()->as<js::RegExpShared>(); return reinterpret_cast<js::RegExpShared*>(value_.toGCThing());
} }
}; };