diff options
author | Moonchild <moonchild@palemoon.org> | 2020-07-04 16:28:30 +0000 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2020-07-04 16:28:30 +0000 |
commit | 66bf3a2279891ed621738fe988359758df881e41 (patch) | |
tree | b68371b08e2f8a18e0c3e39fecd92991749e7f0a /dom/script/ModuleScript.h | |
parent | 9b60e71109e9df98b5ecc7ffcc58284758fc8b82 (diff) | |
download | UXP-66bf3a2279891ed621738fe988359758df881e41.tar UXP-66bf3a2279891ed621738fe988359758df881e41.tar.gz UXP-66bf3a2279891ed621738fe988359758df881e41.tar.lz UXP-66bf3a2279891ed621738fe988359758df881e41.tar.xz UXP-66bf3a2279891ed621738fe988359758df881e41.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(); }; |