diff options
author | Moonchild <moonchild@palemoon.org> | 2020-07-04 16:28:30 +0000 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2020-07-10 18:30:48 +0000 |
commit | f6a6900a6b14d1d54da46370015b28d4d8a152a7 (patch) | |
tree | 6af248540f32f4427e9a01164804aca505aae379 /dom/script/ModuleScript.h | |
parent | 40aad1a2209607b973170f4fb64548e5d8103402 (diff) | |
download | UXP-f6a6900a6b14d1d54da46370015b28d4d8a152a7.tar UXP-f6a6900a6b14d1d54da46370015b28d4d8a152a7.tar.gz UXP-f6a6900a6b14d1d54da46370015b28d4d8a152a7.tar.lz UXP-f6a6900a6b14d1d54da46370015b28d4d8a152a7.tar.xz UXP-f6a6900a6b14d1d54da46370015b28d4d8a152a7.zip |
Issue #618 - Further align error handling for module scripts with the spec
Ref: BZ 1388728
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 97fdb8ed1..571359859 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(); }; |