Skip to content

Commit

Permalink
Merge pull request youtube#726 from dahlstrom-g/libxml-96.0.4664.153
Browse files Browse the repository at this point in the history
Merge third_party/libxml from tag 96.0.4664.153

b/281111358
  • Loading branch information
kaidokert committed Jun 28, 2023
2 parents e977b5b + 2024e6c commit f97ba09
Show file tree
Hide file tree
Showing 192 changed files with 6,789 additions and 2,375 deletions.
123 changes: 69 additions & 54 deletions third_party/libxml/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@

# Define an "os_include" variable that points at the OS-specific generated
# headers. These were generated by running the configure script offline.
if (is_starboard) {
if (use_cobalt_customizations) {
os_include = "starboard"
} else if (is_linux || is_android || is_nacl || is_fuchsia) {
} else
if (is_linux || is_chromeos || is_android || is_nacl || is_fuchsia) {
os_include = "linux"
} else if (is_mac || is_ios) {
} else if (is_apple) {
os_include = "mac"
} else if (is_win) {
os_include = "win32"
Expand Down Expand Up @@ -74,7 +75,7 @@ config("libxml_warnings") {
"-Wno-unused-but-set-variable",
]
}
} else if (is_linux) {
} else if (is_linux || is_chromeos) {
cflags = [
# gcc spits out a bunch of warnings about passing too many arguments to
# __xmlSimpleError.
Expand All @@ -83,44 +84,44 @@ config("libxml_warnings") {
}
}

if (!is_starboard) {
static_library("xml_reader") {
# Do not expand this visibility list without first consulting with the
# Security Team.
visibility = [
"//base/test:test_support",
"//components/policy/core/common:unit_tests",
"//services/data_decoder:*",
"//tools/traffic_annotation/auditor:auditor_sources",
]
if (is_win) {
visibility += [ "//components/wifi" ]
}
sources = [
"chromium/xml_reader.cc",
"chromium/xml_reader.h",
]
deps = [
":libxml",
":libxml_utils",
]
configs += [ ":libxml_config" ]
if (!use_cobalt_customizations) { # exclude libraries "xml_reader" and "xml_writer"
static_library("xml_reader") {
# Do not expand this visibility list without first consulting with the
# Security Team.
visibility = [
"//base/test:test_support",
"//components/policy/core/common:unit_tests",
"//services/data_decoder:*",
"//tools/traffic_annotation/auditor:auditor_sources",
]
if (is_win) {
visibility += [ "//components/wifi" ]
}
sources = [
"chromium/xml_reader.cc",
"chromium/xml_reader.h",
]
deps = [
":libxml",
":libxml_utils",
]
configs += [ ":libxml_config" ]
}

static_library("xml_writer") {
# The XmlWriter is considered safe to use from any target.
visibility = [ "*" ]
sources = [
"chromium/xml_writer.cc",
"chromium/xml_writer.h",
]
deps = [
":libxml",
":libxml_utils",
]
configs += [ ":libxml_config" ]
}
static_library("xml_writer") {
# The XmlWriter is considered safe to use from any target.
visibility = [ "*" ]
sources = [
"chromium/xml_writer.cc",
"chromium/xml_writer.h",
]
deps = [
":libxml",
":libxml_utils",
]
configs += [ ":libxml_config" ]
}
} # exclude libraries "xml_reader" and "xml_writer"

static_library("libxml_utils") {
# Do not expand this visibility list without first consulting with the
Expand All @@ -144,15 +145,17 @@ static_library("libxml") {
# Do not expand this visibility list without first consulting with the
# Security Team.
visibility = [
":libxml_utils",
":xml_reader",
":xml_writer",
":libxml_utils",
"//chromecast/internal",
"//testing/libfuzzer/*",
"//third_party/blink/renderer/*",
"//third_party/fontconfig",
"//third_party/libxslt",
"//third_party/maldoca/*",
]
if (is_starboard) {
if (use_cobalt_customizations) {
visibility += [
"//base/test:test_support",
"//cobalt/base",
Expand All @@ -172,11 +175,6 @@ static_library("libxml") {
# Commented out sources are libxml2 files we do not want to include. They are
# here to make it easy to identify files which are new.
sources = [
"linux/config.h",
"linux/include/libxml/xmlversion.h",
"mac/config.h",
"mac/include/libxml/xmlversion.h",

#"src/DOCBparser.c",
"src/HTMLparser.c",
"src/HTMLtree.c",
Expand Down Expand Up @@ -245,8 +243,6 @@ static_library("libxml") {
"src/include/libxml/xpath.h",
"src/include/libxml/xpathInternals.h",
"src/include/libxml/xpointer.h",
"src/include/win32config.h",
"src/include/wsockcompat.h",

#"src/legacy.c",
"src/libxml.h",
Expand Down Expand Up @@ -297,21 +293,40 @@ static_library("libxml") {
"src/xpointer.c",
#"src/xzlib.c",
"src/xzlib.h",
"win32/config.h",
"win32/include/libxml/xmlversion.h",
]

if (!is_starboard) {
configs -= [ "//build/config/compiler:chromium_code" ]
}
if (!use_cobalt_customizations) {
configs -= [ "//build/config/compiler:chromium_code" ]
}
configs += [
"//build/config/compiler:no_chromium_code",

# Must be after no_chromium_code for warning flags to be ordered correctly.
":libxml_warnings",
]

if (is_linux || is_chromeos) {
sources += [
"linux/config.h",
"linux/include/libxml/xmlversion.h",
]
}

if (is_mac) {
sources += [
"mac/config.h",
"mac/include/libxml/xmlversion.h",
]
}

if (is_win) {
sources += [
"src/include/win32config.h",
"src/include/wsockcompat.h",
"win32/config.h",
"win32/include/libxml/xmlversion.h",
]

# libxml2 already defines WIN32_LEAN_AND_MEAN.
configs -= [ "//build/config/win:lean_and_mean" ]
}
Expand All @@ -320,7 +335,7 @@ static_library("libxml") {
public_deps = [ "//third_party/icu:icuuc" ]
deps = [ "//third_party/zlib" ]

if (is_mac || is_ios || is_android || is_fuchsia) {
if (is_apple || is_android || is_fuchsia) {
# http://www.xmlsoft.org/threads.html says that this is required when using
# libxml from several threads, which can possibly happen in chrome. On
# linux, this is picked up by transitivity from pkg-config output from
Expand Down
3 changes: 3 additions & 0 deletions third_party/libxml/DIR_METADATA
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
monorail: {
component: "Blink>XML"
}
12 changes: 5 additions & 7 deletions third_party/libxml/METADATA
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,13 @@ description:
third_party {
url {
type: GIT
value: "https://chromium.googlesource.com/chromium/src/third_party/libxml"
value: "https://chromium.googlesource.com/chromium/src"
}
# NOTE: This is @v2.9.10 release tag, which does not match the repo
# version exactly, because of various intermediate Chromium changes
version: "405e251c"
version: "96.0.4664.153"
last_upgrade_date {
year: 2020
month: 5
day: 1
year: 2023
month: 6
day: 27
}
license_type: NOTICE
}
4 changes: 1 addition & 3 deletions third_party/libxml/OWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@
# a CL to add yourself here.
[email protected]
[email protected]
[email protected]

# COMPONENT: Blink>XML
[email protected]
10 changes: 4 additions & 6 deletions third_party/libxml/README.chromium
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Name: libxml
URL: http://xmlsoft.org
Version: e4fb36841800038c289997432ca547c9bfef9db1
CPEPrefix: cpe:/a:xmlsoft:libxml2:2.9.9
Version: dea91c97debeac7c1aaf9c19f79029809e23a353
CPEPrefix: cpe:/a:xmlsoft:libxml2:2.9.12
License: MIT
License File: src/Copyright
Security Critical: yes
Expand All @@ -20,10 +20,8 @@ Modifications:
See https://crbug.com/708433
- libxml2-2.9.4-security-xpath-nodetab-uaf.patch: See https://crbug.com/705445
- chromium-issue-708434.patch: Guard against input counter overflow.
- revert-non-recursive-xml-parsing.patch: Making parts of the XML parser
non-recursive broke a few web platform tests.
- add-missing-ifdef-in-xml-reader.patch: Bug fix forgot to guard functionality
with appropriate #ifdef.
- chromium-issue-1138555.patch: Change TRUE to 1 for ICU68 which remove the
#define of TRUE.
- Add helper classes in the chromium/ subdirectory.
- Delete various unused files, see chromium/roll.py

Expand Down
13 changes: 0 additions & 13 deletions third_party/libxml/chromium/add-missing-ifdef-in-xml-reader.patch

This file was deleted.

Loading

0 comments on commit f97ba09

Please sign in to comment.