www-client/chromium: disable xml catalogs
authorMike Gilbert <floppym@gentoo.org>
Sat, 16 Jun 2018 19:33:58 +0000 (15:33 -0400)
committerMike Gilbert <floppym@gentoo.org>
Sat, 16 Jun 2018 19:34:11 +0000 (15:34 -0400)
Bug: https://bugs.gentoo.org/653078
Package-Manager: Portage-2.3.40_p14, Repoman-2.3.9_p246

www-client/chromium/chromium-69.0.3452.0.ebuild
www-client/chromium/files/chromium-disable_xml_catalogs.patch [new file with mode: 0644]

index fa806ad8d2d34ef3fc84dae7f92846e64f8c54ff..f6ce8e32881c44f067a9635bdd029f23cba8adb7 100644 (file)
@@ -138,6 +138,7 @@ PATCHES=(
        "${FILESDIR}/chromium-stdint.patch"
        "${FILESDIR}/chromium-ffmpeg-r1.patch"
        "${FILESDIR}/chromium-libwebp-shim-r0.patch"
+       "${FILESDIR}/chromium-disable_xml_catalogs.patch"
 )
 
 pre_build_checks() {
diff --git a/www-client/chromium/files/chromium-disable_xml_catalogs.patch b/www-client/chromium/files/chromium-disable_xml_catalogs.patch
new file mode 100644 (file)
index 0000000..7aff36c
--- /dev/null
@@ -0,0 +1,34 @@
+--- a/third_party/blink/renderer/core/xml/parser/xml_document_parser.cc
++++ b/third_party/blink/renderer/core/xml/parser/xml_document_parser.cc
+@@ -28,6 +28,10 @@
+ #include <libxml/parser.h>
+ #include <libxml/parserInternals.h>
++#include <libxml/xmlversion.h>
++#if defined(LIBXML_CATALOG_ENABLED)
++#include <libxml/catalog.h>
++#endif
+ #include <libxslt/xslt.h>
+ #include <memory>
+@@ -538,10 +542,6 @@
+ static bool ShouldAllowExternalLoad(const KURL& url) {
+   String url_string = url.GetString();
+-  // libxml should not be configured with catalogs enabled, so it
+-  // should not be asking to load default catalogs.
+-  CHECK(!IsLibxmlDefaultCatalogFile(url));
+-
+   // The most common DTD. There isn't much point in hammering www.w3c.org by
+   // requesting this URL for every XHTML document.
+   if (url_string.StartsWithIgnoringASCIICase("http://www.w3.org/TR/xhtml"))
+@@ -648,6 +648,9 @@
+   if (did_init)
+     return;
++#if defined(LIBXML_CATALOG_ENABLED)
++  xmlCatalogSetDefaults(XML_CATA_ALLOW_NONE);
++#endif
+   xmlInitParser();
+   xmlRegisterInputCallbacks(MatchFunc, OpenFunc, ReadFunc, CloseFunc);
+   xmlRegisterOutputCallbacks(MatchFunc, OpenFunc, WriteFunc, CloseFunc);