diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
commit | 40a355a42d4a9444dc753c04c6608dade2f06a23 (patch) | |
tree | 871fc667d2de662f171103ce5ec067014ef85e61 /js/public/Value.h | |
parent | Adding upstream version 124.0.1. (diff) | |
download | firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.tar.xz firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.zip |
Adding upstream version 125.0.1.upstream/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.h | 16 |
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)); } |