From 8f7d40e854f2941c2ddd75fb6532407e07a72609 Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Sun, 1 Sep 2019 16:44:47 +0200 Subject: Issue #1222: Don't load plugin instances when they have no `src` URI. Favor fallback content in that case (if present). Fallback is always considered "good" in this case so may end up doing nothing which is what we'd want for corner cases that hammer this routine with no content. --- dom/base/nsObjectLoadingContent.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'dom/base') diff --git a/dom/base/nsObjectLoadingContent.cpp b/dom/base/nsObjectLoadingContent.cpp index 590f236c0..4978744e8 100644 --- a/dom/base/nsObjectLoadingContent.cpp +++ b/dom/base/nsObjectLoadingContent.cpp @@ -3628,6 +3628,14 @@ nsObjectLoadingContent::HasGoodFallback() { } } + // RULE "nosrc": + // Use fallback content if the object has not specified a src URI. + if (rulesList[i].EqualsLiteral("nosrc")) { + if (!mOriginalURI) { + return true; + } + } + // RULE "adobelink": // Don't use fallback content when it has a link to adobe's website. if (rulesList[i].EqualsLiteral("adobelink")) { -- cgit v1.2.3