From 086c044dc34dfc0f74fbe41f4ecb402b2cd34884 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 03:13:33 +0200 Subject: Merging upstream version 125.0.1. Signed-off-by: Daniel Baumann --- js/public/Value.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'js/public/Value.h') diff --git a/js/public/Value.h b/js/public/Value.h index 59f71da4f1..98f0f9273b 100644 --- a/js/public/Value.h +++ b/js/public/Value.h @@ -383,6 +383,9 @@ enum JSWhyMagic { /** arguments object can't be created because environment is dead. */ JS_MISSING_ARGUMENTS, + /** exception value thrown when interrupting irregexp */ + JS_INTERRUPT_REGEXP, + /** for local use */ JS_GENERIC_MAGIC, @@ -645,7 +648,20 @@ class alignas(8) Value { } #endif + void changeGCThingPayload(js::gc::Cell* cell) { + MOZ_ASSERT(js::gc::IsCellPointerValid(cell)); +#ifdef DEBUG + assertTraceKindMatches(cell); +#endif + asBits_ = bitsFromTagAndPayload(toTag(), PayloadType(cell)); + MOZ_ASSERT(toGCThing() == cell); + } + private: +#ifdef DEBUG + void assertTraceKindMatches(js::gc::Cell* cell) const; +#endif + void setObjectNoCheck(JSObject* obj) { asBits_ = bitsFromTagAndPayload(JSVAL_TAG_OBJECT, PayloadType(obj)); } -- cgit v1.2.3