Android build for ungoogled-chromium. https://uc.droidware.info
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

214 lines
8.6 KiB

From: Wengling Chen <[email protected]>
Date: Tue, 26 May 2020 22:31:34 -0400
Subject: Remove DCHECK and other lines causing Debug builds to fail
---
build/android/gyp/compile_java.py | 2
build/config/compiler/BUILD.gn | 7
cc/trees/layer_tree_host_impl.cc | 3
components/omnibox/browser/autocomplete_controller.cc | 3
components/omnibox/browser/autocomplete_match.cc | 10
components/omnibox/browser/autocomplete_result.cc | 7
components/omnibox/browser/shortcuts_backend.cc | 3
components/policy/core/browser/configuration_policy_handler.cc | 1
components/signin/internal/identity_manager/primary_account_manager.cc | 12
components/signin/internal/identity_manager/profile_oauth2_token_service_builder.cc | 1
content/common/input/input_event_stream_validator.cc | 3
services/network/network_context.cc | 1
url/gurl.cc | 3
24 files changed, 401 insertions(+), 62 deletions(-)
--- a/components/signin/internal/identity_manager/primary_account_manager.cc
+++ b/components/signin/internal/identity_manager/primary_account_manager.cc
@@ -137,18 +137,6 @@ void PrimaryAccountManager::SetAuthentic
DCHECK(!account_info.account_id.empty());
DCHECK(!IsAuthenticated());
-#if DCHECK_IS_ON()
- {
- std::string pref_account_id;
- bool consented_to_sync =
- client_->GetPrefs()->GetBoolean(prefs::kGoogleServicesConsentedToSync);
-
- DCHECK(pref_account_id.empty() || !consented_to_sync ||
- pref_account_id == account_info.account_id.ToString())
- << "account_id=" << account_info.account_id
- << " pref_account_id=" << pref_account_id;
- }
-#endif // DCHECK_IS_ON()
SetPrimaryAccountInternal(account_info, /*consented_to_sync=*/true);
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -240,7 +240,7 @@ config("compiler") {
cflags_cc = []
cflags_objc = []
cflags_objcc = []
- ldflags = []
+ ldflags = [ "-Wl,-error-limit=0", "-Wl,--gc-sections", "-fdata-sections", "-ffunction-sections", "-Wl,--gdb-index", ]
defines = []
configs = []
@@ -1949,8 +1949,6 @@ if (is_win) {
# Put data and code in their own sections, so that unused symbols
# can be removed at link time with --gc-sections.
- "-fdata-sections",
- "-ffunction-sections",
]
common_optimize_on_ldflags += [
@@ -1958,7 +1956,6 @@ if (is_win) {
# See http://lwn.net/Articles/192624/ .
# -O2 enables string tail merge optimization in gold and lld.
"-Wl,-O2",
- "-Wl,--gc-sections",
]
}
}
@@ -2316,7 +2313,7 @@ config("symbols") {
# sections (llvm.org/PR34820).
cflags += [ "-ggnu-pubnames" ]
}
- ldflags += [ "-Wl,--gdb-index" ]
+ ldflags += []
}
}
}
--- a/components/policy/core/browser/configuration_policy_handler.cc
+++ b/components/policy/core/browser/configuration_policy_handler.cc
@@ -352,7 +352,6 @@ SchemaValidatingPolicyHandler::SchemaVal
Schema schema,
SchemaOnErrorStrategy strategy)
: policy_name_(policy_name), schema_(schema), strategy_(strategy) {
- DCHECK(schema_.valid());
}
SchemaValidatingPolicyHandler::~SchemaValidatingPolicyHandler() {}
--- a/build/android/gyp/compile_java.py
+++ b/build/android/gyp/compile_java.py
@@ -150,7 +150,7 @@ ERRORPRONE_WARNINGS_TO_ERROR = [
'LongLiteralLowerCaseSuffix',
'MultiVariableDeclaration',
'RedundantOverride',
- 'RemoveUnusedImports',
+ #'RemoveUnusedImports',
'StaticQualifiedUsingExpression',
'StringEquality',
'TimeUnitMismatch',
--- a/components/signin/internal/identity_manager/profile_oauth2_token_service_builder.cc
+++ b/components/signin/internal/identity_manager/profile_oauth2_token_service_builder.cc
@@ -177,7 +177,6 @@ std::unique_ptr<ProfileOAuth2TokenServic
// device ID is needed on the network thread, but can only be generated on the
// main thread.
std::string device_id = signin::GetSigninScopedDeviceId(pref_service);
- DCHECK(!device_id.empty());
#endif
return std::make_unique<ProfileOAuth2TokenService>(
--- a/components/omnibox/browser/autocomplete_match.cc
+++ b/components/omnibox/browser/autocomplete_match.cc
@@ -1213,16 +1213,6 @@ void AutocompleteMatch::TryAutocompleteW
is_navigational_title_match = true;
}
-#if DCHECK_IS_ON()
-void AutocompleteMatch::Validate() const {
- std::string provider_name = provider ? provider->GetName() : "None";
- ValidateClassifications(contents, contents_class, provider_name);
- ValidateClassifications(description, description_class, provider_name);
- ValidateClassifications(description_for_shortcuts,
- description_class_for_shortcuts, provider_name);
-}
-#endif // DCHECK_IS_ON()
-
// static
void AutocompleteMatch::ValidateClassifications(
const base::string16& text,
--- a/components/omnibox/browser/autocomplete_result.cc
+++ b/components/omnibox/browser/autocomplete_result.cc
@@ -617,13 +617,6 @@ void AutocompleteResult::CopyFrom(const
matches_ = other.matches_;
}
-#if DCHECK_IS_ON()
-void AutocompleteResult::Validate() const {
- for (auto i(begin()); i != end(); ++i)
- i->Validate();
-}
-#endif // DCHECK_IS_ON()
-
// static
GURL AutocompleteResult::ComputeAlternateNavUrl(
const AutocompleteInput& input,
--- a/components/omnibox/browser/shortcuts_backend.cc
+++ b/components/omnibox/browser/shortcuts_backend.cc
@@ -119,9 +119,6 @@ void ShortcutsBackend::RemoveObserver(Sh
void ShortcutsBackend::AddOrUpdateShortcut(const base::string16& text,
const AutocompleteMatch& match) {
-#if DCHECK_IS_ON()
- match.Validate();
-#endif // DCHECK_IS_ON()
const base::string16 text_lowercase(base::i18n::ToLower(text));
const base::Time now(base::Time::Now());
for (ShortcutMap::const_iterator it(
--- a/components/omnibox/browser/autocomplete_controller.cc
+++ b/components/omnibox/browser/autocomplete_controller.cc
@@ -647,9 +647,6 @@ void AutocompleteController::UpdateResul
// Need to validate before invoking CopyOldMatches as the old matches are not
// valid against the current input.
-#if DCHECK_IS_ON()
- result_.Validate();
-#endif // DCHECK_IS_ON()
if (!done_) {
// This conditional needs to match the conditional in Start that invokes
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -4305,9 +4305,6 @@ gfx::Vector2dF LayerTreeHostImpl::Scroll
void LayerTreeHostImpl::ScrollLatchedScroller(ScrollState* scroll_state,
base::TimeDelta delayed_by) {
- DCHECK(CurrentlyScrollingNode());
- DCHECK(scroll_state);
- DCHECK(latched_scroll_type_.has_value());
ScrollNode& scroll_node = *CurrentlyScrollingNode();
const gfx::Vector2dF delta(scroll_state->delta_x(), scroll_state->delta_y());
--- a/content/common/input/input_event_stream_validator.cc
+++ b/content/common/input/input_event_stream_validator.cc
@@ -29,9 +29,6 @@ void InputEventStreamValidator::Validate
if (!enabled_)
return;
- DCHECK(ValidateImpl(event, &error_msg_))
- << error_msg_
- << "\nInvalid Event: " << ui::WebInputEventTraits::ToString(event);
}
bool InputEventStreamValidator::ValidateImpl(
--- a/services/network/network_context.cc
+++ b/services/network/network_context.cc
@@ -845,7 +845,6 @@ void NetworkContext::QueueReport(const s
const GURL& url,
const base::Optional<std::string>& user_agent,
base::Value body) {
- NOTREACHED();
}
void NetworkContext::QueueSignedExchangeReport(
--- a/url/gurl.cc
+++ b/url/gurl.cc
@@ -158,7 +158,8 @@ const std::string& GURL::spec() const {
if (is_valid_ || spec_.empty())
return spec_;
- DCHECK(false) << "Trying to get the spec of an invalid URL!";
+ //DCHECK(false) << "Trying to get the spec of an invalid URL!";
+ LOG(INFO) << "gurl.cc: warning: Trying to get the spec of an invalid URL: " << spec_;
return base::EmptyString();
}