Issue #618 - Fix error events fired when loading JS module dependencies fail

When module dependencies fail, don't spam with errors for each import; only fire
the error event once.

Ref: BZ 1421259
This commit is contained in:
Moonchild
2020-07-08 10:50:53 +00:00
parent e378530bca
commit 786e344698
5 changed files with 12 additions and 9 deletions
+2 -2
View File
@@ -21,11 +21,11 @@ using namespace mozilla::dom;
NS_IMETHODIMP
ScriptElement::ScriptAvailable(nsresult aResult,
nsIScriptElement *aElement,
bool aIsInline,
bool aIsInlineClassicScript,
nsIURI *aURI,
int32_t aLineNo)
{
if (!aIsInline && NS_FAILED(aResult)) {
if (!aIsInlineClassicScript && NS_FAILED(aResult)) {
nsCOMPtr<nsIParser> parser = do_QueryReferent(mCreatorParser);
if (parser) {
parser->PushDefinedInsertionPoint();