diff options
author | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-09-01 16:44:47 +0200 |
---|---|---|
committer | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-09-01 18:20:28 +0200 |
commit | 8f7d40e854f2941c2ddd75fb6532407e07a72609 (patch) | |
tree | 9e302ed366574011329b125961c5f60252e739e9 /dom/base/nsObjectLoadingContent.cpp | |
parent | 09a8b2f19689b679b1268a3004ec5e3f37b9732a (diff) | |
download | UXP-8f7d40e854f2941c2ddd75fb6532407e07a72609.tar UXP-8f7d40e854f2941c2ddd75fb6532407e07a72609.tar.gz UXP-8f7d40e854f2941c2ddd75fb6532407e07a72609.tar.lz UXP-8f7d40e854f2941c2ddd75fb6532407e07a72609.tar.xz UXP-8f7d40e854f2941c2ddd75fb6532407e07a72609.zip |
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.
Diffstat (limited to 'dom/base/nsObjectLoadingContent.cpp')
-rw-r--r-- | dom/base/nsObjectLoadingContent.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
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")) { |