summaryrefslogtreecommitdiffstats
path: root/js/public/Value.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:33 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:33 +0000
commit086c044dc34dfc0f74fbe41f4ecb402b2cd34884 (patch)
treea4f824bd33cb075dd5aa3eb5a0a94af221bbe83a /js/public/Value.h
parentAdding debian version 124.0.1-1. (diff)
downloadfirefox-086c044dc34dfc0f74fbe41f4ecb402b2cd34884.tar.xz
firefox-086c044dc34dfc0f74fbe41f4ecb402b2cd34884.zip
Merging upstream version 125.0.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'js/public/Value.h')
-rw-r--r--js/public/Value.h16
1 files changed, 16 insertions, 0 deletions
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));
}