From 4aeaea919588a04e0298cd08b829d8f6d8c276d3 Mon Sep 17 00:00:00 2001 From: Moonchild Date: Thu, 12 Nov 2020 11:58:39 +0000 Subject: 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) --- js/src/gc/Heap.h | 4 ++-- js/src/regexp/regexp-error.h | 1 + js/src/regexp/regexp-shim.h | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) (limited to 'js') diff --git a/js/src/gc/Heap.h b/js/src/gc/Heap.h index 208941532..2f2770260 100644 --- a/js/src/gc/Heap.h +++ b/js/src/gc/Heap.h @@ -280,13 +280,13 @@ struct Cell template inline T* as() { - MOZ_ASSERT(is()); + MOZ_ASSERT(this->is()); return static_cast(this); } template inline const T* as() const { - MOZ_ASSERT(is()); + MOZ_ASSERT(this->is()); return static_cast(this); } diff --git a/js/src/regexp/regexp-error.h b/js/src/regexp/regexp-error.h index ef9d037dd..4b495f07d 100644 --- a/js/src/regexp/regexp-error.h +++ b/js/src/regexp/regexp-error.h @@ -5,6 +5,7 @@ #ifndef V8_REGEXP_REGEXP_ERROR_H_ #define V8_REGEXP_REGEXP_ERROR_H_ +#include "regexp-shim.h" namespace v8 { namespace internal { diff --git a/js/src/regexp/regexp-shim.h b/js/src/regexp/regexp-shim.h index 6b6a8c639..7677da084 100644 --- a/js/src/regexp/regexp-shim.h +++ b/js/src/regexp/regexp-shim.h @@ -957,7 +957,7 @@ class JSRegExp : public HeapObject { private: js::RegExpShared* inner() { - return value_.toGCThing()->as(); + return reinterpret_cast(value_.toGCThing()); } }; -- cgit v1.2.3