diff options
Diffstat (limited to 'dom/script/ModuleScript.h')
-rw-r--r-- | dom/script/ModuleScript.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/dom/script/ModuleScript.h b/dom/script/ModuleScript.h index 97fdb8ed19..5713598592 100644 --- a/dom/script/ModuleScript.h +++ b/dom/script/ModuleScript.h @@ -23,6 +23,7 @@ class ModuleScript final : public nsISupports RefPtr<ScriptLoader> mLoader; nsCOMPtr<nsIURI> mBaseURL; JS::Heap<JSObject*> mModuleRecord; + JS::Heap<JS::Value> mError; ~ModuleScript(); @@ -31,13 +32,18 @@ public: NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(ModuleScript) ModuleScript(ScriptLoader* aLoader, - nsIURI* aBaseURL, - JS::Handle<JSObject*> aModuleRecord); + nsIURI* aBaseURL); + + void SetModuleRecord(JS::Handle<JSObject*> aModuleRecord); + void SetPreInstantiationError(const JS::Value& aError); ScriptLoader* Loader() const { return mLoader; } JSObject* ModuleRecord() const { return mModuleRecord; } nsIURI* BaseURL() const { return mBaseURL; } + bool IsErrored() const; + JS::Value Error() const; + void UnlinkModuleRecord(); }; |