summaryrefslogtreecommitdiffstats
path: root/js/src/builtin/ModuleObject.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/builtin/ModuleObject.cpp')
-rw-r--r--js/src/builtin/ModuleObject.cpp20
1 files changed, 12 insertions, 8 deletions
diff --git a/js/src/builtin/ModuleObject.cpp b/js/src/builtin/ModuleObject.cpp
index ae966c89a..2790b1c44 100644
--- a/js/src/builtin/ModuleObject.cpp
+++ b/js/src/builtin/ModuleObject.cpp
@@ -725,12 +725,6 @@ ModuleObject::namespace_()
return &value.toObject().as<ModuleNamespaceObject>();
}
-ScriptSourceObject*
-ModuleObject::scriptSourceObject() const
-{
- return &getReservedSlot(ScriptSourceObjectSlot).toObject().as<ScriptSourceObject>();
-}
-
FunctionDeclarationVector*
ModuleObject::functionDeclarations()
{
@@ -744,10 +738,8 @@ ModuleObject::functionDeclarations()
void
ModuleObject::init(HandleScript script)
{
- MOZ_ASSERT(script);
initReservedSlot(ScriptSlot, PrivateValue(script));
initReservedSlot(StatusSlot, Int32Value(MODULE_STATUS_UNINSTANTIATED));
- initReservedSlot(ScriptSourceObjectSlot, ObjectValue(script->scriptSourceUnwrap()));
}
void
@@ -876,6 +868,18 @@ ModuleObject::evaluationError() const
return getReservedSlot(EvaluationErrorSlot);
}
+Value
+ModuleObject::hostDefinedField() const
+{
+ return getReservedSlot(HostDefinedSlot);
+}
+
+void
+ModuleObject::setHostDefinedField(const JS::Value& value)
+{
+ setReservedSlot(HostDefinedSlot, value);
+}
+
Scope*
ModuleObject::enclosingScope() const
{