diff options
author | Moonchild <moonchild@palemoon.org> | 2020-07-08 12:58:30 +0000 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2020-08-30 09:33:06 +0000 |
commit | 498b1ab0c8db07784badbd2148f372027ef8cc27 (patch) | |
tree | 4b25652523fc84ca588671412b556195cef33d80 /dom/script/ModuleLoadRequest.cpp | |
parent | 2f145b6eda95c08a76711f0393e4d9ebe13a5f92 (diff) | |
download | UXP-498b1ab0c8db07784badbd2148f372027ef8cc27.tar UXP-498b1ab0c8db07784badbd2148f372027ef8cc27.tar.gz UXP-498b1ab0c8db07784badbd2148f372027ef8cc27.tar.lz UXP-498b1ab0c8db07784badbd2148f372027ef8cc27.tar.xz UXP-498b1ab0c8db07784badbd2148f372027ef8cc27.zip |
Issue #618 - Align error handling for module scripts with the spec (again)
This updates module implementation to match spec regarding handling of
instantiation errors, after it was changed yet again, this time to not remember
instantiation errors, but instead immediately rethrow applicable ones.
Ref: BZ 1420420
Diffstat (limited to 'dom/script/ModuleLoadRequest.cpp')
-rw-r--r-- | dom/script/ModuleLoadRequest.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/dom/script/ModuleLoadRequest.cpp b/dom/script/ModuleLoadRequest.cpp index d62214304..a12fcb162 100644 --- a/dom/script/ModuleLoadRequest.cpp +++ b/dom/script/ModuleLoadRequest.cpp @@ -83,7 +83,7 @@ ModuleLoadRequest::ModuleLoaded() // been loaded. mModuleScript = mLoader->GetFetchedModule(mURI); - if (!mModuleScript || mModuleScript->IsErrored()) { + if (!mModuleScript || mModuleScript->HasParseError()) { ModuleErrored(); return; } @@ -95,7 +95,7 @@ void ModuleLoadRequest::ModuleErrored() { mLoader->CheckModuleDependenciesLoaded(this); - MOZ_ASSERT(!mModuleScript || mModuleScript->IsErrored()); + MOZ_ASSERT(!mModuleScript || mModuleScript->HasParseError()); CancelImports(); SetReady(); |