summaryrefslogtreecommitdiffstats
path: root/dom/script/ModuleScript.cpp
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2020-07-04 10:35:22 +0000
committerMoonchild <moonchild@palemoon.org>2020-07-10 18:30:30 +0000
commit1e14031a5940f6846f6ecce1b3c889b6a3d9b67a (patch)
tree24576100e20b270c9a027345d996996104809c38 /dom/script/ModuleScript.cpp
parent765c90318f192ba18848095133b0531c3162678d (diff)
downloadUXP-1e14031a5940f6846f6ecce1b3c889b6a3d9b67a.tar
UXP-1e14031a5940f6846f6ecce1b3c889b6a3d9b67a.tar.gz
UXP-1e14031a5940f6846f6ecce1b3c889b6a3d9b67a.tar.lz
UXP-1e14031a5940f6846f6ecce1b3c889b6a3d9b67a.tar.xz
UXP-1e14031a5940f6846f6ecce1b3c889b6a3d9b67a.zip
Issue #618 - Remove eager instantiation
This backs out the stuff added in Bug 1295978. Ref: BZ 1295978, 1388728
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