Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] main from chromium:main #103

Merged
merged 50 commits into from
Dec 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
0ce2db5
Roll Chrome Linux PGO Profile
Dec 13, 2021
7cd9af9
Always assume that non-auto 'columns' might create a multicol.
mstensho Dec 13, 2021
a063bab
[base] Use allocator::Unchecked{Alloc,Free}() on Fuchsia.
Dec 13, 2021
a64a029
Switch off console-format-style.js
paullewis Dec 13, 2021
d8ee2e5
[Code Health] Remove uses of Value::DeepCopy()
chikamune-cr Dec 13, 2021
eef6744
Move TextFragmentAnchor histograms to content_creation folder + extend.
sebsg Dec 13, 2021
06a806c
Roll DevTools Frontend from 784f3c36176c to 0e3067f96d33 (7 revisions)
Dec 13, 2021
3207aef
[ParttionAlloc] Start removing support for thread-unsafe PartitionAlloc.
Dec 13, 2021
312744c
[Windows] Remove duplicate use of NtQueryObject.
Dec 13, 2021
3906812
Ensure that if a fenced frame changes its name it doesn't get replica…
dtapuska Dec 13, 2021
acbce9d
Android: Add incremental install benchmark
Dec 13, 2021
8ae97f3
Metrics: Add tsergeant@ as owner for 'chromeos' histograms
tgsergeant Dec 13, 2021
2e9d246
[DevTools] Migrate WebIDBCallbacksImpl to use AsyncTaskContext
wolfib Dec 13, 2021
0e3c312
Updating trunk VERSION from 4764.0 to 4765.0
Dec 13, 2021
558b7e5
Rewrite DidFinishNavigation to PrimaryPageChanged.
dtapuska Dec 13, 2021
1a5d756
Do not lookup WebContents to retrieve BrowserContext.
dtapuska Dec 13, 2021
c68d3a2
[attribution_reporting] Convert AttributionReport to class
linnan-github Dec 13, 2021
6a12757
Add fenced frame resource files.
dtapuska Dec 13, 2021
92a043e
Extend HttpCache.AccessToDone.* and revive BeforeSend.*
Dec 13, 2021
546ce61
Search History Link: added UMA histograms on Android
Dec 13, 2021
0eddbb5
Roll Help App from YAoFZhWmq... to uwAu1UD0o...
Dec 13, 2021
1142cbf
Update material design to 1.6.0-alpha01.
Dec 13, 2021
c8c9989
Roll Perfetto Trace Processor Win from 44638d7a4268 to 1302b4259684
Dec 13, 2021
571353c
Convert net::DnsOverHttpsServerConfig into a class
bemasc-uproxy Dec 13, 2021
05eaa06
Lookalikes: Check if skeleton_generator_ is null before derefing
meacer Dec 13, 2021
60535a2
Move failing Mac12 test suites to experimental on mac-osxbeta-rel
Dec 13, 2021
72f4747
[page info] Create history data source
Dec 13, 2021
8a9e9e4
[CloudReady][OOBE] Migrate OsInstall screen to Polymer3
Dec 13, 2021
b7ef18b
[launcher]: Update continue section icon to spec
Dec 13, 2021
9e4c528
Fix weblayer crash on profile shutdown.
Dec 13, 2021
e0b509b
Roll Media App from VzElkqrRc... to Hm4ipUPiX...
Dec 13, 2021
0f812b0
Deprecate SystemProfileProto::Stability.renderer_hang_count.
Dec 13, 2021
d9f6522
Temporarily disable Screen Share warning mode
Dec 13, 2021
ea38331
[Autofill Assistant] Rename CUP to CUPImpl
Sergio-Vila Dec 13, 2021
2abe469
Android: Update maven version used by turbine 3pp
Dec 13, 2021
2bbdc54
Roll androidx from ZwN1FJVBO... to ii2JADPHS...
Dec 13, 2021
b56014b
Move ScopedProfileKeepAlive to c/b/profiles/keep_alive
Dec 13, 2021
1806f90
ax_dump_tree: support different APIs on windows
spectranaut Dec 13, 2021
4b09890
Roll Chrome Win64 PGO Profile
Dec 13, 2021
236f8a6
Roll Perfetto Trace Processor Linux from 44638d7a4268 to 1302b4259684
Dec 13, 2021
21097e8
Make PagedAppsGridView own CardifiedAnimationObservers
Dec 13, 2021
932bc4e
Restore broken logic of the visited_copy usage
Dec 13, 2021
926503d
Automatic update for log_list.json
Dec 13, 2021
dc116ec
[PA] Enable thread cache after ConfigurePartitions
bartekn-chromium Dec 13, 2021
55d1630
Roll Chromite from f773c1b06736 to fff14ebdcbb0 (6 revisions)
Dec 13, 2021
f0a95c7
[Autofill Assistant] Remove WebContents from dependencies
Dec 13, 2021
0acdd22
power: Emit zero values into avg Power.ForegroundBatteryDrain histograms
betasheet Dec 13, 2021
3e9abd3
[ZT] Add Callback Parameter to RotateKey in DTKeyManager
Dec 13, 2021
04e80d4
Use the new added GrContextOption to control glyph padding
phuang Dec 13, 2021
3e99b5b
Remove LocalFrameView::UpdateCompositedSelectionIfNeeded
progers Dec 13, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
10 changes: 5 additions & 5 deletions DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ vars = {
# Three lines of non-changing comments so that
# the commit queue can handle CLs rolling devtools-frontend
# and whatever else without interference from each other.
'devtools_frontend_revision': '784f3c36176c63465b44bff1dd5e09afe3ba0192',
'devtools_frontend_revision': '0e3067f96d33d956c373562cbe2229daf70ae9ca',
# Three lines of non-changing comments so that
# the commit queue can handle CLs rolling libprotobuf-mutator
# and whatever else without interference from each other.
Expand Down Expand Up @@ -799,7 +799,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/androidx',
'version': 'ZwN1FJVBOl4Uffy4fDLOpuNkz2AqPE9BKdRfZAw6IW0C',
'version': 'ii2JADPHSlhVAF0MiMM_l3jpeHy8oz-P17QozjnyGr0C',
},
],
'condition': 'checkout_android',
Expand Down Expand Up @@ -1018,7 +1018,7 @@ deps = {
# Tools used when building Chrome for Chrome OS. This affects both the Simple
# Chrome workflow, as well as the chromeos-chrome ebuild.
'src/third_party/chromite': {
'url': Var('chromium_git') + '/chromiumos/chromite.git' + '@' + 'f773c1b06736d405d6faeaa07b6d7e2d71530be4',
'url': Var('chromium_git') + '/chromiumos/chromite.git' + '@' + 'fff14ebdcbb0fd75801af82d2765758efa1ec579',
'condition': 'checkout_chromeos',
},

Expand Down Expand Up @@ -1719,7 +1719,7 @@ deps = {
'packages': [
{
'package': 'chromeos_internal/apps/help_app/app',
'version': 'YAoFZhWmq3yGzz6bZU92my4ovAy7UE7FNQiDTj8jfA8C',
'version': 'uwAu1UD0oDj17zqx0Af0wZnVecasHn1pBC4V6A3JBRwC',
},
],
'condition': 'checkout_chromeos and checkout_src_internal',
Expand All @@ -1730,7 +1730,7 @@ deps = {
'packages': [
{
'package': 'chromeos_internal/apps/media_app/app',
'version': 'VzElkqrRcSVJ-3KF6CDaXYxI_GsHoTVAknOitsszTtEC',
'version': 'Hm4ipUPiXd-gzWDEbyraNGipQikDIbxi1Xc70s6BwWQC',
},
],
'condition': 'checkout_chromeos and checkout_src_internal',
Expand Down
1 change: 0 additions & 1 deletion android_webview/browser/aw_feature_list_creator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ const char* const kPersistentPrefsAllowlist[] = {
metrics::prefs::kStabilityFileMetricsUnsentSamplesCount,
metrics::prefs::kStabilityLaunchCount,
metrics::prefs::kStabilityPageLoadCount,
metrics::prefs::kStabilityRendererHangCount,
metrics::prefs::kStabilityRendererLaunchCount,
// Unsent logs.
metrics::prefs::kMetricsInitialLogs,
Expand Down
15 changes: 10 additions & 5 deletions ash/app_list/views/paged_apps_grid_view.cc
Original file line number Diff line number Diff line change
Expand Up @@ -127,13 +127,15 @@ class CardifiedAnimationObserver : public ui::ImplicitAnimationObserver {
CardifiedAnimationObserver(const CardifiedAnimationObserver&) = delete;
CardifiedAnimationObserver& operator=(const CardifiedAnimationObserver&) =
delete;
~CardifiedAnimationObserver() override = default;
~CardifiedAnimationObserver() override {
if (callback_)
std::move(callback_).Run();
}

// ui::ImplicitAnimationObserver:
void OnImplicitAnimationsCompleted() override {
if (callback_)
std::move(callback_).Run();
delete this;
}

private:
Expand Down Expand Up @@ -1141,8 +1143,9 @@ void PagedAppsGridView::AnimateCardifiedState() {
auto animator = animation_settings(entry_view->layer());
// When the animations are done, discard the layer and reset view to
// proper scale.
animator->AddObserver(
new CardifiedAnimationObserver(on_bounds_animator_callback));
animation_observers_.push_back(std::make_unique<CardifiedAnimationObserver>(
on_bounds_animator_callback));
animator->AddObserver(animation_observers_.back().get());
entry_view->layer()->SetTransform(gfx::Transform());
}

Expand Down Expand Up @@ -1194,8 +1197,10 @@ void PagedAppsGridView::AnimateCardifiedState() {

void PagedAppsGridView::MaybeCallOnBoundsAnimatorDone() {
--bounds_animation_for_cardified_state_in_progress_;
if (bounds_animation_for_cardified_state_in_progress_ == 0)
if (bounds_animation_for_cardified_state_in_progress_ == 0) {
animation_observers_.clear();
OnBoundsAnimatorDone(/*animator=*/nullptr);
}
}

void PagedAppsGridView::RecenterItemsContainer() {
Expand Down
4 changes: 4 additions & 0 deletions ash/app_list/views/paged_apps_grid_view.h
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,10 @@ class ASH_EXPORT PagedAppsGridView : public AppsGridView,
// Vertical tile spacing between the tile views on the first page.
int first_page_vertical_tile_padding_ = 0;

// Cardified animation observers.
std::vector<std::unique_ptr<ui::ImplicitAnimationObserver>>
animation_observers_;

base::WeakPtrFactory<PagedAppsGridView> weak_ptr_factory_{this};
};

Expand Down
6 changes: 1 addition & 5 deletions base/allocator/allocator_shim.h
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,6 @@ BASE_EXPORT void EnablePartitionAllocMemoryReclaimer();
BASE_EXPORT void ReconfigurePartitionAllocLazyCommit(bool enabled);

using EnableBrp = base::StrongAlias<class EnableBrpTag, bool>;
using ThreadCacheOnNonQuarantinablePartition =
base::StrongAlias<class ThreadCacheOnNonQuarantinablePartitionTag, bool>;
using SplitMainPartition = base::StrongAlias<class SplitMainPartitionTag, bool>;
using UseDedicatedAlignedPartition =
base::StrongAlias<class UseDedicatedAlignedPartitionTag, bool>;
Expand All @@ -188,9 +186,7 @@ using UseDedicatedAlignedPartition =
BASE_EXPORT void ConfigurePartitions(
EnableBrp enable_brp,
SplitMainPartition split_main_partition,
UseDedicatedAlignedPartition use_dedicated_aligned_partition,
ThreadCacheOnNonQuarantinablePartition
thread_cache_on_non_quarantinable_partition);
UseDedicatedAlignedPartition use_dedicated_aligned_partition);

#if defined(PA_ALLOW_PCSCAN)
BASE_EXPORT void EnablePCScan(base::internal::PCScan::InitConfig);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,12 +134,10 @@ class MainPartitionConstructor {
constexpr base::PartitionOptions::ThreadCache thread_cache =
#if BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC)
// Additional partitions may be created in ConfigurePartitions(). Since
// only one partition can have thread cache enabled, leave this ability
// to the new main partition. If such a partition isn't needed, the
// thread cache will be then turned on in this one.
// TODO(bartekn): Revert crrev.com/c/3240505 once
// PartitionAllocSimulateBRPPartitionSplit is no longer needed. The main
// reason is to bring back ThreadCache::kEnabled in the default case.
// only one partition can have thread cache enabled, postpone the
// decision to turn the thread cache on until after that call.
// TODO(bartekn): Enable it here by default, once the "split-only" mode
// is no longer needed.
base::PartitionOptions::ThreadCache::kDisabled;
#else // BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC)
// Other tests, such as the ThreadCache tests create a thread cache,
Expand Down Expand Up @@ -502,11 +500,7 @@ alignas(base::ThreadSafePartitionRoot) uint8_t
void ConfigurePartitions(
EnableBrp enable_brp,
SplitMainPartition split_main_partition,
UseDedicatedAlignedPartition use_dedicated_aligned_partition,
ThreadCacheOnNonQuarantinablePartition
thread_cache_on_non_quarantinable_partition) {
// |thread_cache_on_non_quarantinable_partition| can't be enabled with BRP.
PA_CHECK(!enable_brp || !thread_cache_on_non_quarantinable_partition);
UseDedicatedAlignedPartition use_dedicated_aligned_partition) {
// BRP cannot be enabled without splitting the main partition. Furthermore, in
// the "before allocation" mode, it can't be enabled without further splitting
// out the aligned partition.
Expand All @@ -527,19 +521,10 @@ void ConfigurePartitions(
// value (unless explicitly overwritten below).
auto* current_aligned_root = g_aligned_root.Get();

// When there is no need to split partition, simply enable thread cache in the
// existing root.
if (!split_main_partition) {
PA_DCHECK(!enable_brp);
PA_DCHECK(!use_dedicated_aligned_partition);
PA_DCHECK(!current_root->with_thread_cache);
if (thread_cache_on_non_quarantinable_partition) {
// The caller is responsible for turning thread cache there. Here, we're
// just making sure nobody else turned it on for themselves.
// TODO(bartekn): Turn on thread cache in one spot, for consistence.
} else {
current_root->EnableThreadCacheIfSupported();
}
return;
}

Expand All @@ -551,9 +536,7 @@ void ConfigurePartitions(
!use_dedicated_aligned_partition
? base::PartitionOptions::AlignedAlloc::kAllowed
: base::PartitionOptions::AlignedAlloc::kDisallowed,
thread_cache_on_non_quarantinable_partition
? base::PartitionOptions::ThreadCache::kDisabled
: base::PartitionOptions::ThreadCache::kEnabled,
base::PartitionOptions::ThreadCache::kDisabled,
base::PartitionOptions::Quarantine::kAllowed,
base::PartitionOptions::Cookie::kAllowed,
enable_brp ? base::PartitionOptions::BackupRefPtr::kEnabled
Expand Down Expand Up @@ -591,12 +574,6 @@ void ConfigurePartitions(
g_aligned_root.Replace(new_aligned_root);
// No need for g_original_aligned_root, because in cases where g_aligned_root
// is replaced, it must've been g_original_root.

if (thread_cache_on_non_quarantinable_partition) {
// The caller is responsible for turning thread cache there. In this
// function, we're just making sure nobody else turned it on for themselves.
// TODO(bartekn): Turn on thread cache in one spot, for consistence.
}
}

#if defined(PA_ALLOW_PCSCAN)
Expand Down
4 changes: 4 additions & 0 deletions base/allocator/partition_allocator/partition_root.cc
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,10 @@ void PartitionRoot<thread_safe>::DecommitEmptySlotSpans() {
template <bool thread_safe>
void PartitionRoot<thread_safe>::Init(PartitionOptions opts) {
{
// TODO(crbug.com/1277519): Should remove all traces of thread-unsafe roots,
// but until this is done, forbid them from being used.
PA_CHECK(thread_safe);

#if defined(OS_APPLE)
// Needed to statically bound page size, which is a runtime constant on
// apple OSes.
Expand Down
17 changes: 2 additions & 15 deletions base/allocator/partition_allocator/partition_root.h
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,6 @@ struct alignas(64) BASE_EXPORT PartitionRoot {
} scan_mode = ScanMode::kDisabled;

bool with_thread_cache = false;
const bool is_thread_safe = thread_safe;

bool allow_aligned_alloc;
bool allow_cookie;
Expand Down Expand Up @@ -281,7 +280,7 @@ struct alignas(64) BASE_EXPORT PartitionRoot {
// use the union { struct { /* all flags */}; /* padding */} trick. Wasting an
// entire cacheline per PartitionRoot is not a big issue, given that
// the object is very large anyway.
uint8_t padding[kPartitionCachelineSize - 7];
uint8_t padding[kPartitionCachelineSize - 6];

// Not used on the fastest path (thread cache allocations), but on the fast
// path of the central allocator.
Expand Down Expand Up @@ -900,8 +899,6 @@ ALWAYS_INLINE bool PartitionAllocIsValidPtrDelta(uintptr_t address,
new_address <= user_data_start + user_data_size;
}

// TODO(glazunov): Simplify the function once the non-thread-safe PartitionRoot
// is no longer used.
ALWAYS_INLINE void PartitionAllocFreeForRefCounting(void* slot_start) {
PA_DCHECK(!internal::PartitionRefCountPointer(slot_start)->IsAlive());

Expand All @@ -926,17 +923,7 @@ ALWAYS_INLINE void PartitionAllocFreeForRefCounting(void* slot_start) {
root->total_count_of_brp_quarantined_slots.fetch_sub(
1, std::memory_order_relaxed);

if (root->is_thread_safe) {
root->RawFreeWithThreadCache(slot_start, slot_span);
return;
}

auto* non_thread_safe_slot_span =
reinterpret_cast<SlotSpanMetadata<NotThreadSafe>*>(slot_span);
auto* non_thread_safe_root =
reinterpret_cast<PartitionRoot<NotThreadSafe>*>(root);
non_thread_safe_root->RawFreeWithThreadCache(slot_start,
non_thread_safe_slot_span);
root->RawFreeWithThreadCache(slot_start, slot_span);
}
#endif // BUILDFLAG(USE_BACKUP_REF_PTR)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -986,6 +986,9 @@ private void initializeAlreadyLocked() {
throw new ProcessInitException(LoaderErrors.FAILED_TO_REGISTER_JNI);
}

// The "Successfully loaded native library" string is used by
// tools/android/build_speed/benchmark.py. Please update that script if this log message is
// changed.
Log.i(TAG, "Successfully loaded native library");
UmaRecorderHolder.onLibraryLoaded();

Expand Down
13 changes: 13 additions & 0 deletions base/process/memory_fuchsia.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "base/allocator/buildflags.h"
#include "base/process/memory.h"

#if BUILDFLAG(USE_ALLOCATOR_SHIM)
#include "base/allocator/allocator_shim.h"
#endif

#include <stdlib.h>

namespace base {
Expand All @@ -17,12 +22,20 @@ void EnableTerminationOnHeapCorruption() {
}

bool UncheckedMalloc(size_t size, void** result) {
#if BUILDFLAG(USE_ALLOCATOR_SHIM)
*result = allocator::UncheckedAlloc(size);
#else
*result = malloc(size);
#endif
return *result != nullptr;
}

void UncheckedFree(void* ptr) {
#if BUILDFLAG(USE_ALLOCATOR_SHIM)
allocator::UncheckedFree(ptr);
#else
free(ptr);
#endif
}

} // namespace base
7 changes: 3 additions & 4 deletions base/task/thread_pool/worker_thread_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include <vector>

#include "base/allocator/allocator_shim.h"
#include "base/allocator/allocator_shim_default_dispatch_to_partition_alloc.h"
#include "base/allocator/buildflags.h"
#include "base/allocator/partition_allocator/partition_alloc_config.h"
#include "base/bind.h"
Expand Down Expand Up @@ -880,10 +881,8 @@ class WorkerThreadThreadCacheDelegate : public WorkerThreadDefaultDelegate {

TEST(ThreadPoolWorkerThreadCachePurgeTest, Purge) {
// Make sure the thread cache is enabled in the main partition.
allocator::ConfigurePartitions(
allocator::EnableBrp(false), allocator::SplitMainPartition(false),
allocator::UseDedicatedAlignedPartition(false),
allocator::ThreadCacheOnNonQuarantinablePartition(false));
base::internal::PartitionAllocMalloc::Allocator()
->EnableThreadCacheIfSupported();

TaskTracker task_tracker;
auto delegate = std::make_unique<WorkerThreadThreadCacheDelegate>();
Expand Down
Loading