mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-08-19 02:43:07 +09:00
Issue #618 - Remove eager instantiation
This backs out the stuff added in Bug 1295978. Ref: BZ 1295978, 1388728
This commit is contained in:
parent
b590ecea12
commit
a754a7be26
6 changed files with 10 additions and 129 deletions
|
|
@ -20,17 +20,9 @@ class ScriptLoader;
|
|||
|
||||
class ModuleScript final : public nsISupports
|
||||
{
|
||||
enum InstantiationState {
|
||||
Uninstantiated,
|
||||
Instantiated,
|
||||
Errored
|
||||
};
|
||||
|
||||
RefPtr<ScriptLoader> mLoader;
|
||||
nsCOMPtr<nsIURI> mBaseURL;
|
||||
JS::Heap<JSObject*> mModuleRecord;
|
||||
JS::Heap<JS::Value> mException;
|
||||
InstantiationState mInstantiationState;
|
||||
|
||||
~ModuleScript();
|
||||
|
||||
|
|
@ -44,20 +36,8 @@ public:
|
|||
|
||||
ScriptLoader* Loader() const { return mLoader; }
|
||||
JSObject* ModuleRecord() const { return mModuleRecord; }
|
||||
JS::Value Exception() const { return mException; }
|
||||
nsIURI* BaseURL() const { return mBaseURL; }
|
||||
|
||||
void SetInstantiationResult(JS::Handle<JS::Value> aMaybeException);
|
||||
bool IsUninstantiated() const {
|
||||
return mInstantiationState == Uninstantiated;
|
||||
}
|
||||
bool IsInstantiated() const {
|
||||
return mInstantiationState == Instantiated;
|
||||
}
|
||||
bool InstantiationFailed() const {
|
||||
return mInstantiationState == Errored;
|
||||
}
|
||||
|
||||
void UnlinkModuleRecord();
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue