summaryrefslogtreecommitdiffstats
path: root/dom/script/ModuleScript.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'dom/script/ModuleScript.cpp')
-rw-r--r--dom/script/ModuleScript.cpp22
1 files changed, 1 insertions, 21 deletions
diff --git a/dom/script/ModuleScript.cpp b/dom/script/ModuleScript.cpp
index 34ef4dec4..bf02f522d 100644
--- a/dom/script/ModuleScript.cpp
+++ b/dom/script/ModuleScript.cpp
@@ -34,7 +34,6 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
NS_IMPL_CYCLE_COLLECTION_TRACE_BEGIN(ModuleScript)
NS_IMPL_CYCLE_COLLECTION_TRACE_JS_MEMBER_CALLBACK(mModuleRecord)
- NS_IMPL_CYCLE_COLLECTION_TRACE_JS_MEMBER_CALLBACK(mException)
NS_IMPL_CYCLE_COLLECTION_TRACE_END
NS_IMPL_CYCLE_COLLECTING_ADDREF(ModuleScript)
@@ -44,13 +43,11 @@ ModuleScript::ModuleScript(ScriptLoader *aLoader, nsIURI* aBaseURL,
JS::Handle<JSObject*> aModuleRecord)
: mLoader(aLoader),
mBaseURL(aBaseURL),
- mModuleRecord(aModuleRecord),
- mInstantiationState(Uninstantiated)
+ mModuleRecord(aModuleRecord)
{
MOZ_ASSERT(mLoader);
MOZ_ASSERT(mBaseURL);
MOZ_ASSERT(mModuleRecord);
- MOZ_ASSERT(mException.isUndefined());
// Make module's host defined field point to this module script object.
// This is cleared in the UnlinkModuleRecord().
@@ -68,7 +65,6 @@ ModuleScript::UnlinkModuleRecord()
JS::SetModuleHostDefinedField(mModuleRecord, JS::UndefinedValue());
}
mModuleRecord = nullptr;
- mException.setUndefined();
}
ModuleScript::~ModuleScript()
@@ -80,21 +76,5 @@ ModuleScript::~ModuleScript()
DropJSObjects(this);
}
-void
-ModuleScript::SetInstantiationResult(JS::Handle<JS::Value> aMaybeException)
-{
- MOZ_ASSERT(mInstantiationState == Uninstantiated);
- MOZ_ASSERT(mModuleRecord);
- MOZ_ASSERT(mException.isUndefined());
-
- if (aMaybeException.isUndefined()) {
- mInstantiationState = Instantiated;
- } else {
- mModuleRecord = nullptr;
- mException = aMaybeException;
- mInstantiationState = Errored;
- }
-}
-
} // dom namespace
} // mozilla namespace