diff options
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)); } |