summaryrefslogtreecommitdiffstats
path: root/js/public/Value.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:14:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:14:29 +0000
commitfbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8 (patch)
tree4c1ccaf5486d4f2009f9a338a98a83e886e29c97 /js/public/Value.h
parentReleasing progress-linux version 124.0.1-1~progress7.99u1. (diff)
downloadfirefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.tar.xz
firefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.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));
}