This CL disables prerendering when the V8 optimizer is disabled by the
site settings to avoid crashing. See also the explanation in the
buganizer for details of the issue.
Bug: 40076091
Change-Id: Id9a61e5df74f724ac40215f3e86f6a5738058228
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5899672
Commit-Queue: Hiroki Nakagawa <nhiroki@chromium.org>
Reviewed-by: Andrey Kosyakov <caseq@chromium.org>
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Reviewed-by: Lingqi Chi <lingqi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1362869}
Handle opening content-URIs and getting info (stat) within File.
This relieves callers from needing to check FilePath::IsContentUri() and
calling OpenContentUri().
We must store path within File for content-URIs so it is available if
File::GetInfo() is ever called.
This CL should be a nop for existing callers of ContentUriUtils that are
updated to use File directly.
Bug: 40101963
Change-Id: Icecc4d7ac6c5cd20f8e3f706b56c77c99c219e60
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5859577
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Joel Hockey <joelhockey@chromium.org>
Owners-Override: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1362856}
This CL introduces the plumbings to override the holdback status from
embedder prefetch triggers (mostly for CCT prefetch at the moment).
In the normal process of calculating holdback status,
CheckAndSetPrefetchHoldbackStatus::CheckAndSetPrefetchHoldbackStatus()
calls associated container's
PreloadingAttemptImpl::ShouldHoldback(), which sets its attempt's
`holdback_status_` to either kAllowed or kHoldback only if the status
isn't set by then.
This CL introduces
PrefetchContainer::SetOverriddenHoldbackStatusIfNecessary(), intended to
be called before ShouldHoldback() in the process of
CheckAndSetPrefetchHoldbackStatus(), so that we can set the overridden
holdback status value (which is given from embedder and stored in the
container) in advance.
Fixed: 335331246
Bug: 40288091
Change-Id: Id3a3b9a95ad85d609afa2f8e5df7af0c8723f222
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5848508
Reviewed-by: Huanpo Lin <robertlin@chromium.org>
Reviewed-by: Domenic Denicola <domenic@chromium.org>
Commit-Queue: Taiyo Mizuhashi <taiyo@chromium.org>
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1362833}
This CL implements sandboxing for OnDeviceTranslation service on Linux.
We allow `membarrier` syscall and reading
"/sys/devices/system/cpu/possible" inside the sandboxed
OnDeviceTranslation service process.
Note: The sandboxed OnDeviceTranslation service will crash until
https://crbug.com/369491267 is resolved.
Bug: 340778819
Change-Id: I289294f35d55bb5dad6bcc0fba422b4077ae2ae7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5884817
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Commit-Queue: Tsuyoshi Horo <horo@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Matthew Denton <mpdenton@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1362827}
The PMProcessPriorityPolicy experiment, which replaces the existing
priority logic for renderers, is causing an increase in navigation
hangs. This is likely due to it having no equivalent for
boost_for_pending_views.
This CL is a quick-and-dirty fix to check if this theory is true,
and I will either revert this change or migrate the
boost_for_pending_views functionality to the performance manager's
voting system.
Change-Id: I89fb89066b795f1df86bd48d5a6d6c1686c29f55
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5899470
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Commit-Queue: Patrick Monette <pmonette@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1362821}
In the old code, when a node scrolled, it was marked dirty and therefore triggered a full serialization. However, because scroll offsets can change many times per second, the new code leverages the very lightweight location change serialization path as follows:
1. AXObjectCacheImpl is notified of a scrolled node in HandleScrollPositionChanged()
2. InvalidateBoundingBox is called for the scrolled node to mark at as pending checks.
3. In ProcessDeferrerAccessibilityEvents(), SerializeLocationChanges is called which now does additional checks on scroll values and serialize scroll values along with location changes if they changed.
-----------------------
Improvements on running perf-tests of scrolling (location-changes-*):
- RenderAccessibilityImpl::SendPendingAccessibilityEvents
- From around 70ms to 0ms. This is because full serialization no longer used.
- BrowserAccessibilityManager::OnAccessibilityEvents
- From 5ms to 0ms
- GetUpdatesAndEventsForSerialization
- From 6-7ms to 0ms
Total Decrease: 81ms
- BrowserAccessibilityManager::OnLocationChanges
- Since location updates now include scrolling, this increased from 0ms to 0.5ms
- SerializeLocationChanges
- From 0ms to 2ms
Total Increase: 2.5ms
Thus, we can say that net improvement/decrease is 96.9% of original time.
NOTE: the perf results are copied from the older CL which was reverted but the logic is the same.
Change-Id: Ida319814aa92136ea52c546cf581d7e09798d86c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5878051
Reviewed-by: Aaron Leventhal <aleventhal@chromium.org>
Commit-Queue: Ahmed Elwasefi (Ahmad45123) <a.m.elwasefi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1362563}
This reduces some flaky tests when a race condition happens and a full serialization occurs that needed info from the location updates.
If we're sending a full serialization anyways it actually makes sense to use one serialization than two seperate ones anyways.. Less overhead.
Change-Id: Ie64acd34e6da92344b423dc013ba40497e5d17d0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5878322
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Dominic Farolino <dom@chromium.org>
Reviewed-by: Aaron Leventhal <aleventhal@chromium.org>
Reviewed-by: Alexander Timin <altimin@chromium.org>
Commit-Queue: Ahmed Elwasefi (Ahmad45123) <a.m.elwasefi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1362560}
Follow-up CL to address CR feedback, thread at:
https://chromium-review.googlesource.com/c/chromium/src/+/5891169/comment/2954108a_e841622c/
Without this CL, when ENABLE_VIDEO_EFFECTS flag is set to false on
Linux, the pre-sandbox hook would not be run, therefore sandbox would
not get engaged for kVideoEffects sandbox type. This should never
happen since `ENABLE_VIDEO_EFFECTS == (IS_WIN || IS_LINUX || IS_MAC)`,
but to make sure that future changes don't accidentally make it
possible, we should make the pre-sandbox hook run irrespectively of
ENABLE_VIDEO_EFFECTS buildflag.
Bug: 361128453
Change-Id: I6a40c294d8a57458d464a6556057f12092b18f52
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5898146
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Reviewed-by: Bryant Chandler <bryantchandler@chromium.org>
Commit-Queue: Piotr Bialecki <bialpio@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1362553}
This function checks if a proxy is needed by comparing SiteInstances.
Now that proxies are per SiteInstanceGroup, change the check to compare
SiteInstanceGroups.
Test: No behaviour change
Bug: 40269084
Change-Id: Ib63caa7051ee2f5a58d8ae7ef0de2d9690df1e24
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5652100
Commit-Queue: Sharon Yang <yangsharon@chromium.org>
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1362547}
This CL splits `MatchType::kOther` into `MatchType::kNoVarySearchHint`
and `MatchType::kOther`. Also, it factors out a function
`CollectPotentialMatchPrefetchContainers` for readability.
Bug: 353489607, 343867153
Change-Id: I7075990991084d910a1f62c72e70f1f44965d14d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5826435
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Commit-Queue: Ken Okada <kenoss@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1362523}
SerializeFrame now returns serialized resources in a callback.
A subsequent change will take advantage of this and fetch some
resources asynchronously.
This change should be a no-op.
Bug: 363289333
Change-Id: If00c8b47add50e384921c29e2a88a167b5b4a058
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5899715
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Dan H <harringtond@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1362478}
This is a part of refactoring of
`PrefetchService::CollectPotentiallyMatchingPrefetchContainers()`.
This CL adds a predicate
`PrefetchContainer::ShouldWaitForNoVarySearchHeader()`.
Behavioral change: This CL changes the condition to set
`PrefetchServingMetricsContainer` to `PrefetchContainer`. Before this
CL, it's not set to the one that is `kShouldBlockUntilHeadReceived` and
has matching NVS hint. After this CL, it's set to the one. Note that the
one that is `kShouldBlockUntilHeadReceived` and matches URL exactly, is
also a target to set. So, this CL just remedies the unevenness. Note
also that the next CL [1] shows the naturality of the fix.
[1] https://crrev.com/c/5826435
Bug: 353489607, 343867153
Change-Id: Ia9b0d980ff0b58160d438fc60b3b9bbe842d1fe0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5823815
Reviewed-by: Lingqi Chi <lingqi@chromium.org>
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Commit-Queue: Ken Okada <kenoss@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1362457}
The new customizable-<select> path forward is to do this:
<select style="appearance: base-select">
rather than this:
<selectlist>
The <selectlist> prototype served us very well, and was the vehicle
with which we developed a lot of the concepts for customizable-
<select>, but it is no longer the direction we're going in standards.
Note: this CL includes a DEPS update to pull in the removal of
"SELECT_LIST" from the patterns.json file. I tried to do that
separately but there are dependencies:
https://chromium-review.googlesource.com/c/chromium/src/+/5868389
Fixed: 335458492,351971330
Change-Id: I372ce18f1bc408f8163b15ca8fa0b065cd7a3ca2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5855076
Reviewed-by: Christoph Schwering <schwering@google.com>
Reviewed-by: Dominic Battré <battre@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Mason Freed <masonf@chromium.org>
Reviewed-by: Sreeja Kamishetty <sreejakshetty@chromium.org>
Reviewed-by: Joey Arhar <jarhar@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1362436}
Add `ADVANCED_MEMORY_SAFETY_CHECKS()` to:
- `content::NavigationThrottle`.
This enforces additional memory safety checks by overloading operator
new/delete. The feature is behind a feature flag disabled by default.
Since this object can be indirectly deleted by many different code
paths, there's a risk of encountering a Use-after-Free if `this` is
accessed after the underlying object has been destroyed.
Bug: 1505316
Change-Id: Ie1eb54c9f2578893eb8c69261e35bc7a5ee2d3fd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5883678
Commit-Queue: Mikihito Matsuura <mikt@google.com>
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Auto-Submit: Mikihito Matsuura <mikt@google.com>
Cr-Commit-Position: refs/heads/main@{#1362310}
The attribution measurement API relies on making a parallel request to a
measurement server while handling an A tag navigation.
In some instances, especially in WebView, this navigation ends up
opening a separate app on Android, putting the browser or
WebView-embedding app in the background. When this happens, the renderer
might call the data host, but the call will not be delivered.
This CL introduces a histogram that logs the number of calls in Blink
and in the browser, to measure any discrepancy.
Change-Id: I698cc89d9fc0d413dc7e1388e9656de439fde958
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5872860
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Commit-Queue: Peter Pakkenberg <pbirk@chromium.org>
Reviewed-by: John Delaney <johnidel@chromium.org>
Reviewed-by: Nate Chapin <japhet@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1362300}
Add `ADVANCED_MEMORY_SAFETY_CHECKS()` to:
- `content::NavigationHandle`.
This enforces additional memory safety checks by overloading operator
new/delete. The feature is behind a feature flag disabled by default.
Since this object can be indirectly deleted by many different code
paths, there's a risk of encountering a Use-after-Free if `this` is
accessed after the underlying object has been destroyed.
Bug: 1505316
Change-Id: I04271144024bf757e48b3892a72e894c8b77062e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5871718
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Commit-Queue: Mikihito Matsuura <mikt@google.com>
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1362290}
Add `ADVANCED_MEMORY_SAFETY_CHECKS()` to:
- `content::NavigationThrottleRunner`.
This enforces additional memory safety checks by overloading operator
new/delete. The feature is behind a feature flag disabled by default.
Since this object can be indirectly deleted by many different code
paths, there's a risk of encountering a Use-after-Free if `this` is
accessed after the underlying object has been destroyed.
Bug: 1505316
Change-Id: I3c43e97b478716f2d0ba9de65e0b7b2bfa565180
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5871626
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Commit-Queue: Mikihito Matsuura <mikt@google.com>
Cr-Commit-Position: refs/heads/main@{#1362289}
Navigation.IsProcessBackgrounded.{Timing} has not been recorded if the
navigation is not the boosting target. This CL fixes this bug.
Updates on ShouldBoostRenderProcessForLoading() function are purely
refactoring purposes.
OBSOLETE_HISTOGRAMS=Patterned histogram Navigation.IsProcessBackgrounded.{Timing} is replaced by Navigation.IsProcessBackgrounded2.{Timing}
Bug: 351953350
Change-Id: I44941524869a57ef497e3db39f08c8ba535e4839
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5897737
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org>
Commit-Queue: Minoru Chikamune <chikamune@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1362209}
The histograms added in crrev.com/c/5848569 etc shows some regression
in RenderFrameImpl::CommitNavigation.
This CL adds timing histograms and traces to more functions called
during or close to commit, to investigate further. This CL also fixes
some histogram names that were wrong.
Bug: 936696
Change-Id: Ia75ab8e129be1cc2c03015911486228c08e03bdc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5898096
Commit-Queue: Rakina Zata Amni <rakina@chromium.org>
Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Auto-Submit: Rakina Zata Amni <rakina@chromium.org>
Commit-Queue: Takashi Toyoshima <toyoshim@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1362196}
Details:
* Removing components/.eslintrc.js had no effect.
* content/browser/resources/.eslintrc.js was hoisted into toplevel
.eslintrc.js
* tools/typescript/definitions/.eslintrc.js was unnecessary since
linting is unnecessary for auto-generated files.
Bug: 369766161, 368085620
Change-Id: I43586614ddc9ed9f6deb12e435c0be4d567f8dbf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5896508
Reviewed-by: Demetrios Papadopoulos <dpapad@chromium.org>
Commit-Queue: Erik Chen <erikchen@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1362150}
This allows lock requests to be identified by types beyond just storage
bucket IDs. This generalization supports use cases like the shared
storage web locks proposal ([1]), which requires its own lock scope
(i.e. per-origin) without integrating with storage buckets or the quota
database. The term "bucket" has been replaced with the more generic
"lock_group" throughout the code.
[1] https://github.com/WICG/shared-storage/pull/199
Bug: 368816425
Change-Id: Iaabd48c4fc5e64d302b2efdadba5cac6f99ebe3c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5879028
Reviewed-by: Ayu Ishii <ayui@chromium.org>
Commit-Queue: Yao Xiao <yaoxia@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1362083}
Add a metric to help us gain more insight into how well
FledgeUsePreconnectCache is doing. This will also be useful for a
future study starting processes at the start of auctions, which
will take advantage of the same cache.
Bug: 353480639
Change-Id: Icf1331fddf7d7d6c23c42871d712eca2f6233e8e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5897973
Commit-Queue: Abigail Katcoff <abigailkatcoff@chromium.org>
Reviewed-by: Orr Bernstein <orrb@google.com>
Reviewed-by: Russ Hamilton <behamilton@google.com>
Cr-Commit-Position: refs/heads/main@{#1362081}
This was only used on Android for an expired Android.ArmCpuPart metric.
It also required blocking calls to /proc/cpuinfo.
This removes caching of /proc/cpuinfo from the startup path. This code
path also happened before crashpad initialization and unfortunately hit
NOTREACHEDs causing silent crashing in the wild as those turned fatal.
Instead of moving this after crashpad initialization it seems it could
be useful to remove reading /proc/cpuinfo altogether unless we need this
metric (in which case we need to version bump it instead).
Bug: 40580068, 368077955
Change-Id: Ib3c8fbbba11c0a440abf5a6991fb554a0ced56a9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5892817
Commit-Queue: Nate Fischer <ntfschr@chromium.org>
Reviewed-by: Yaron Friedman <yfriedman@chromium.org>
Auto-Submit: Peter Boström <pbos@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Reviewed-by: Nate Fischer <ntfschr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1362045}
The usage of last_succesful_url in IsNavigationSameSite should not be
necessary anymore as the SiteInstance selection logic should not need
to rely on the last_successful_url at this time. This CL removes the
conditional check and updates a test which captures the desired behavior
of a very specific navigation case.
Change-Id: I63368f91f768f62101d18244b0c806f4cdae7780
Bug: 40248630
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4073945
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Commit-Queue: Nasko Oskov <nasko@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1362037}
For the Protected Audience KVv2 trusted signals API, the caching
implementation passes data to the Javascript process for entire
compression groups at a time. This CL adds a method to completely parse
a single compression group to trusted_signals_kvv2_helper.cc.
Unlike other methods, this API does not currently take a list of
interest groups or keys to extract, so that parsed data can be used
to handle requests that are received after the process has already
received and parsed the response body (we may try and improve this
later).
Bug: 333445540
Change-Id: I5b8fc1687ccda382dba63d95cbb057072558eb00
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5883079
Reviewed-by: Russ Hamilton <behamilton@google.com>
Commit-Queue: mmenke <mmenke@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1361976}
This CL introduces RenderWidgetHostInputEventRouter class to Viz which
would be used for Viz hit testing on VizCompositorThread with
InputVizard. This class is RefCounted to allow deleting it when no
CompositorFrameSinks are attached to a particular WebContents on Viz.
Additionally, this CL also introduces VizRenderInputRouterDelegate, an
initial(empty) implementation of RenderInputRouterDelegate interface
which will be fleshed out in subsequent CLs. Added tests to test the
lifecycle of RWHIER and VizRenderInputRouterDelegate on Viz.
Design Doc:
https://docs.google.com/document/d/1tRPUd11fuPcXxb2ep_kGYPahgv0OOlV7DvsGkbom7VA/preview?tab=t.0#heading=h.jfx7uyd6rv1u
Bug: b:364216540
Change-Id: If4cdec4f57796362d6505dc3ee8678a197ed8adb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5828875
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Commit-Queue: Aman Verma <amanvr@google.com>
Cr-Commit-Position: refs/heads/main@{#1361904}