summaryrefslogtreecommitdiffstats
path: root/js/src/jsscript.h
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/jsscript.h')
-rw-r--r--js/src/jsscript.h20
1 files changed, 15 insertions, 5 deletions
diff --git a/js/src/jsscript.h b/js/src/jsscript.h
index d8d28ebeb..fd5c96a16 100644
--- a/js/src/jsscript.h
+++ b/js/src/jsscript.h
@@ -638,12 +638,22 @@ class ScriptSourceObject : public NativeObject
return static_cast<JSScript*>(untyped);
}
+ void setPrivate(const Value& value) {
+ setReservedSlot(PRIVATE_SLOT, value);
+ }
+ Value getPrivate() const {
+ return getReservedSlot(PRIVATE_SLOT);
+ }
+
private:
- static const uint32_t SOURCE_SLOT = 0;
- static const uint32_t ELEMENT_SLOT = 1;
- static const uint32_t ELEMENT_PROPERTY_SLOT = 2;
- static const uint32_t INTRODUCTION_SCRIPT_SLOT = 3;
- static const uint32_t RESERVED_SLOTS = 4;
+ enum {
+ SOURCE_SLOT = 0,
+ ELEMENT_SLOT,
+ ELEMENT_PROPERTY_SLOT,
+ INTRODUCTION_SCRIPT_SLOT,
+ PRIVATE_SLOT,
+ RESERVED_SLOTS
+ };
};
enum GeneratorKind { NotGenerator, LegacyGenerator, StarGenerator };