summaryrefslogtreecommitdiff
path: root/js/src/jsscript.h
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2020-11-28 10:18:10 +0000
committerMoonchild <moonchild@palemoon.org>2020-11-28 10:18:10 +0000
commit060e3eb0c8163698b52d59e333d9c4496c78a2c2 (patch)
tree7f23ae89939b79400774643c0e7a658b0ce7cb36 /js/src/jsscript.h
parent15914ec5780e7867ab508a48a83311c56950f8a9 (diff)
downloaduxp-060e3eb0c8163698b52d59e333d9c4496c78a2c2.tar.gz
Revert "Issue #1691 - Part 1: Provide a way of associating a private value with a script"
This reverts commit 15914ec5780e7867ab508a48a83311c56950f8a9.
Diffstat (limited to 'js/src/jsscript.h')
-rw-r--r--js/src/jsscript.h20
1 files changed, 5 insertions, 15 deletions
diff --git a/js/src/jsscript.h b/js/src/jsscript.h
index fd5c96a16d..d8d28ebebe 100644
--- a/js/src/jsscript.h
+++ b/js/src/jsscript.h
@@ -638,22 +638,12 @@ 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:
- enum {
- SOURCE_SLOT = 0,
- ELEMENT_SLOT,
- ELEMENT_PROPERTY_SLOT,
- INTRODUCTION_SCRIPT_SLOT,
- PRIVATE_SLOT,
- RESERVED_SLOTS
- };
+ 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 GeneratorKind { NotGenerator, LegacyGenerator, StarGenerator };