0
Commit Graph

234 Commits

Author SHA1 Message Date
Clemens Backes
d7db97026e [v8][wasm] Remove WebAssemblyMemory64 flag
Memory64 shipped in M-133 and the flag expired in M-135. Thus remove the
flag and related logic.

R=avi@chromium.org

Fixed: 394327593
Change-Id: Iafd9bc5ce6b7296d3f55991896227084138a22a3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6249386
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1418523}
2025-02-11 01:47:27 -08:00
Tom Sepez
8726d30ed0 Suppress unsafe_libc_call warning for initial identified files.
See docs/unsafe_buffers.md for details. Enforcement is not yet
enabled, but this set of files are not in compliance with the
new warnings.

Bug: 390223051
Change-Id: I4e24c2141b9399f572678302c833947494098b29
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6187925
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Owners-Override: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1412673}
2025-01-28 18:11:08 -08:00
Thomas Lukaszewicz
47141e8d6a Enforce --disallow-v8-feature-flag-overrides in the renderer
This renderer command line switch is intended to prevent feature
flag overrides from configuring V8 flags.

To enforce this, v8 feature flag overrides have been conditioned on
this command line switch in the following locations:
  - content::RenderProcessImpl::RenderProcessImpl()
  - gin::SetFeatureFlags()

This change is intended to enable consistent V8 flags at build-time
and run-time, and hence compatibility for bundled code caches.

Bug: 388577282
Change-Id: Ifd2465cf54bc8353a2f33701157bc9be538eb777
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6144831
Commit-Queue: Thomas Lukaszewicz <tluk@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Code-Coverage: findit-for-me@appspot.gserviceaccount.com <findit-for-me@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#1407497}
2025-01-16 12:00:42 -08:00
Ari Chivukula
c8dcafc6dc Clean up stale base::Feature "SharedArrayBufferOnDesktop"
Now that SharedArrayBuffer is fully unlaunched except where COI is
ensured, this feature seems redundant as kSharedArrayBuffer provides the
same path to force enabling this feature but isn't desktop specific.

Fixed: 356624443
Change-Id: Iee09f557af290379f7ddc33cfd77d5e396769fbd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6047766
Reviewed-by: Colin Blundell <blundell@chromium.org>
Commit-Queue: Camille Lamy <clamy@chromium.org>
Auto-Submit: Ari Chivukula <arichiv@chromium.org>
Reviewed-by: Camille Lamy <clamy@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1388287}
2024-11-26 17:07:58 +00:00
Peter Boström
fc7ddc185b Migrate to NOTREACHED() in content/
NOTREACHED() and NOTREACHED_IN_MIGRATION() are both CHECK-fatal now.
The former is [[noreturn]] so this CL also performs dead-code removal
after the NOTREACHED().

This CL does not attempt to do additional rewrites of any surrounding
code, like:

if (!foo) {
  NOTREACHED();
}

to CHECK(foo);

Those transforms take a non-trivial amount of time (and there are
thousands of instances). Cleanup can be left as an exercise for the
reader.

This does clean up kCrashOnDanglingBrowserContext as both paths of the
kill switch are currently fatal. This has been rolled out for a long
time.

Bug: 40580068, 40062641
Change-Id: Ib88e710d003e2e48df3fc502ca54d2341d157a0e
Cq-Include-Trybots: luci.chromium.try:linux-dcheck-off-rel
Low-Coverage-Reason: OTHER Should-be-unreachable code
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5974816
Reviewed-by: Łukasz Anforowicz <lukasza@chromium.org>
Commit-Queue: Łukasz Anforowicz <lukasza@chromium.org>
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Auto-Submit: Peter Boström <pbos@chromium.org>
Reviewed-by: Sam McNally <sammc@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1376522}
2024-10-31 19:37:21 +00:00
Shu-yu Guo
c79d03c0a7 Remove chrome://flags entry for experimental JS shared memory
Bug: v8:12547
Change-Id: Ief07029c051871b66a603186c13dbe121f573e1b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5908669
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Philip Rogers <pdr@chromium.org>
Reviewed-by: Nasko Oskov <nasko@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1365194}
2024-10-07 22:37:44 +00:00
Adam Klein
37f9fd474b WebAssembly JS String Builtins: tie kill switch to V8 commandline flag
Because this is a V8 feature, it's not sufficient to have a kill switch
generated from runtime_enabled_features.json5. In addition, the state
of that blink::feature must be forwarded on (if overridden) to V8,
in the usual manner for tying Chromium features to V8 commandline flags.

blink::feature created in Chromium-side shipping CL https://crrev.com/c/5836134.

V8-side shipping in https://crrev.com/c/5837501.

Bug: 42204114
Change-Id: I795c9001f84e336b8d0a803e37aa35f1df80da58
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5838001
Commit-Queue: Adam Klein <adamk@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1351125}
2024-09-04 23:58:58 +00:00
Peter Boström
26666a70da Wire up non-fatal DCHECKs for v8
This replaces an old LOGGING_DCHECK strategy which would only generate
crash reports if LOGGING_DCHECK is fatal (which it almost never is).

Bug: 345125730
Change-Id: Idc74b30c0af71afeb068cecf5e4ab63b5575c244
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5832771
Reviewed-by: danakj <danakj@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Auto-Submit: Peter Boström <pbos@chromium.org>
Commit-Queue: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1350806}
2024-09-04 15:25:48 +00:00
Shu-yu Guo
df3b63f9de [array-grouping] Remove the base::Feature
The proposal was shipped in M117.

Bug: 42202446
Change-Id: I18ebe10114d12adf9bd426578c62f169d313a440
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5564234
Reviewed-by: Adam Klein <adamk@chromium.org>
Reviewed-by: Stefan Zager <szager@chromium.org>
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Commit-Queue: Dave Tapuska <dtapuska@chromium.org>
Auto-Submit: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1305689}
2024-05-24 14:17:09 +00:00
Deepti
1a413e033c [wasm] Add Chrome flag for WebAssembly Memory64
Bug: 41480344
Change-Id: I1f2da9409c8762aa0cf3a95f5339c07d95c15efd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5530099
Commit-Queue: Avi Drissman <avi@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Auto-Submit: Deepti Gandluri <gdeepti@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1301632}
2024-05-15 22:50:53 +00:00
Peter Boström
8472105d01 Use NOTREACHED_IN_MIGRATION() in content/
This was generated by replacing "  NOTREACHED()" with
"  NOTREACHED_IN_MIGRATION()" and running git cl format.

This prepares for making NOTREACHED() [[noreturn]] alongside
NotReachedIsFatal migration of existing inventory.

Bug: 40580068
Change-Id: I3b48b89911ac5e9ffcb211622992f917f8f9e8d9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5539619
Auto-Submit: Peter Boström <pbos@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Owners-Override: Lei Zhang <thestig@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Peter Boström <pbos@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1301096}
2024-05-15 04:36:02 +00:00
Shu-yu Guo
83450beaf8 Disable import assertions
V8 has deprecated import assertions in favor of import attributes for 3
milestones and is removing support for import attributes.

This CL:
- Stops passing the V8 flag --harmony-import-assertions
- Renames references to import assertions to import attributes

See https://groups.google.com/a/chromium.org/g/blink-dev/c/ZHvzLaJZRvo/m/FgNDBjrtBQAJ

Bug: 40643756
Change-Id: Ib2f4fbe246d4132f410e9d6207cefe13b885cbb6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5507816
Reviewed-by: Weizhong Xia <weizhong@google.com>
Reviewed-by: Stefan Zager <szager@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1296067}
2024-05-03 14:24:10 +00:00
Takuto Ikuta
c8d6b16f02 format windows headers using new config.
Test new config:
https://chromium-review.googlesource.com/c/chromium/src/+/5197064

by applying clang-format on every problematic windows headers.

This CL is cloned from https://crrev.com/c/5366045.

Script:
-------

```
function replace {
    echo "Replacing $1 by $2"
    git grep -l "$1" \
        | cut -f1 -d: \
        | grep \
              -e "\.h" \
              -e "\.cc" \
        | grep -v "third_party/[^b]" \
        | sort \
        | uniq \
        | xargs sed -i "s/$1/$2/gi"
}

git checkout origin/main
git branch -D change-5197064 || true

git new-branch change-5197064
replace "#include <\(initguid|mmdeviceapi\|windows\|winsock2\|ws2tcpip\|shobjidl\|atlbase\|ole2\|unknwn\|objbase\|tchar\).h>" ""
replace "#include \"base\\/win\\/atl.h\"" ""
replace "#include <uiautomation.*>" ""
git add -u
git commit -m "remove problematic windows headers"
git revert HEAD --no-commit
git add -u
git commit -m "add problematic windows headers"
git cl format --upstream=HEAD~
git add -u
git commit -m "format"

git cl issue 5367127
git cl upload -df --bypass-hook
```

Also removed some unnecessary comments.

Bug: 329138753
Change-Id: I161c28ea2d27c569825e0c789a4c143530937f58
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5367127
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Owners-Override: Peter Kasting <pkasting@chromium.org>
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
Reviewed-by: Peter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1287420}
2024-04-15 16:59:19 +00:00
Peter Boström
c55a9e329a Add back fallback wasm-trap handling
Crashpad was understood to be unconditionally enabled in
https://crrev.com/c/5237441. Turns out that that wasn't true for
content_shell.

This change sets up wasm-trap handling for the case where content_shell
has not enabled crash reporting but moves the responsibility to
ShellContentRendererClient. The default ContentRendererClient assumes
that crash reporting is enabled (crashpad enabled by default) and does
not set up its own handler.

Bug: 327517309
Change-Id: If3d5f9a313c22e5926d276e6fdfbe9fefe20445d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5372409
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Commit-Queue: Peter Boström <pbos@chromium.org>
Reviewed-by: Charlie Reis <creis@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1277046}
2024-03-22 19:40:19 +00:00
Peter Boström
5077d9590b Remove use_combined_annotations
This makes ChromeOS use crashpad annotations directly now that it's
universally enabled.

We remove the switch --enable-crashpad and
crash_reporter::IsCrashpadEnabled() and clean up some obviously-dead
code as a result.

This does not (yet) universally enable crashpad in components/crash as
it's not turned on for is_castos (which is being turned down). There are
also direct breakpad dependencies in //remoting and //chromecast.

Bug: b:318421053, 1176772, 1520868
Change-Id: I0ecc7792bec4a49a067b660793238f393e70d504
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5237441
Commit-Queue: Peter Boström <pbos@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
Reviewed-by: Ian Barkley-Yeung <iby@chromium.org>
Reviewed-by: Xiyuan Xia <xiyuan@chromium.org>
Reviewed-by: Matthew Denton <mpdenton@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1259483}
2024-02-12 22:28:40 +00:00
Jakob Kummerow
b04b326a4b Clean up expired WebAssembly feature flags
Relaxed-SIMD and GC have shipped by default. Stringref is on hold.

Fixed: b:40949298,b:40949297,b:40284378
Change-Id: Iecbd9614f034fe9384e9d927d7a5a20dc5999dc4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5268424
Auto-Submit: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Charlie Reis <creis@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1256692}
2024-02-06 11:27:33 +00:00
Francis McCabe
244e32c58d [wasm][jspi] Remove architecture reference from JSPI flag defn.
Bug: v8:12191
Change-Id: I5bcd03abe0240b29af69540245949971806e0aa9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5147749
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Commit-Queue: Francis McCabe <fgm@chromium.org>
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1252758}
2024-01-26 18:32:14 +00:00
Samuel Parker
95517184d4 Reland "Enable WebAssembly trap handlers for AArch64"
This is a reland of commit 520c335469.

Original change's description:
> The use of trap handlers for WebAssembly OOB accesses have been
> enabled in V8 for a while. The chromium tests had already been
> updated to handle the change when testing a simulator build, and this
> patch finally flips the switch to enable the feature.
>
> Cq-Include-Trybots: luci.chromium.try:linux_chromium_msan_rel_ng
> Change-Id: Ife085d435ca28b100e9b16e4e985447c90aa9faa
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5028657
> Commit-Queue: Andre Kempe <andre.kempe@arm.com>
> Reviewed-by: Kentaro Hara <haraken@chromium.org>
> Reviewed-by: danakj <danakj@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1224295}

Cq-Include-Trybots: luci.chromium.try:linux_chromium_msan_rel_ng;luci.chromium.try:linux-arm64-castos
Change-Id: I1c4365bf5a70c568a6493f8c099d3ddbca6affe8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5058536
Reviewed-by: danakj <danakj@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Andre Kempe <andre.kempe@arm.com>
Cr-Commit-Position: refs/heads/main@{#1229271}
2023-11-27 13:11:55 +00:00
luci-bisection@appspot.gserviceaccount.com
df83aa3ad4 Revert "Enable WebAssembly trap handlers for AArch64"
This reverts commit 520c335469.

Reason for revert:
LUCI Bisection has identified this change as the culprit of a build failure. See the analysis: https://ci.chromium.org/ui/p/chromium/bisection/compile-analysis/b/8764439140677950945

Sample failed build: https://ci.chromium.org/b/8764439140677950945

If this is a false positive, please report it at https://bugs.chromium.org/p/chromium/issues/entry?comment=Analysis%3A+https%3A%2F%2Fci.chromium.org%2Fui%2Fp%2Fchromium%2Fbisection%2Fcompile-analysis%2Fb%2F8764439140677950945&components=Tools%3ETest%3EFindit&labels=LUCI-Bisection-Wrong%2CPri-3%2CType-Bug&status=Available&summary=Wrongly+blamed+https%3A%2F%2Fchromium-review.googlesource.com%2Fc%2Fchromium%2Fsrc%2F%2B%2F5028657

Original change's description:
> Enable WebAssembly trap handlers for AArch64
>
> The use of trap handlers for WebAssembly OOB accesses have been
> enabled in V8 for a while. The chromium tests had already been
> updated to handle the change when testing a simulator build, and this
> patch finally flips the switch to enable the feature.
>
> Cq-Include-Trybots: luci.chromium.try:linux_chromium_msan_rel_ng
> Change-Id: Ife085d435ca28b100e9b16e4e985447c90aa9faa
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5028657
> Commit-Queue: Andre Kempe <andre.kempe@arm.com>
> Reviewed-by: Kentaro Hara <haraken@chromium.org>
> Reviewed-by: danakj <danakj@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1224295}
>

Change-Id: Iae5e97792cd1662d52ea5113cfe86383e1beb282
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5027490
Bot-Commit: luci-bisection@appspot.gserviceaccount.com <luci-bisection@appspot.gserviceaccount.com>
Commit-Queue: luci-bisection@appspot.gserviceaccount.com <luci-bisection@appspot.gserviceaccount.com>
Owners-Override: luci-bisection@appspot.gserviceaccount.com <luci-bisection@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#1224304}
2023-11-14 15:53:14 +00:00
Samuel Parker
520c335469 Enable WebAssembly trap handlers for AArch64
The use of trap handlers for WebAssembly OOB accesses have been
enabled in V8 for a while. The chromium tests had already been
updated to handle the change when testing a simulator build, and this
patch finally flips the switch to enable the feature.

Cq-Include-Trybots: luci.chromium.try:linux_chromium_msan_rel_ng
Change-Id: Ife085d435ca28b100e9b16e4e985447c90aa9faa
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5028657
Commit-Queue: Andre Kempe <andre.kempe@arm.com>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1224295}
2023-11-14 15:39:29 +00:00
Edgar Arriaga
9cbfecd74d Restrict ThreadPoolCap2 fixed size to apply only to the renderer process
Bug: b/276797051
Change-Id: Ie21149929c5a26bf08ffd2e6e7ab57854d55d4d7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4956957
Reviewed-by: Francois Pierre Doray <fdoray@chromium.org>
Commit-Queue: Edgar Arriaga García <edgararriaga@google.com>
Auto-Submit: Edgar Arriaga García <edgararriaga@google.com>
Reviewed-by: Gabriel Charette <gab@chromium.org>
Reviewed-by: Alexander Timin <altimin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1213017}
2023-10-21 00:06:58 +00:00
Arthur Sonzogni
bdeca8e234 Privatize content features.
There are two headers to declare features in content.
- the public one: `content/public/common/content_features.h`
- the private one: `content/common/features.h`.

Unfortunately, most are declared in the public one, despite being used
privately exclusively. This violate the `content/public/` rules. This
patches provides a fix.

Parts of this patch was made programmatically using this script:
https://paste.googleplex.com/6699322946093056, with the following
output: https://paste.googleplex.com/5591288895242240

This patch:
1. Update `docs/how_to_add_your_feature_flag.md` to incentive
   developers to the non public versions.
2. Move ~70 features back into the private version.
3. Programmatically update the includes to include the correct
   #include header(s).
4. For consistency and minimizing the amount of files modified,
   the two headers to use the `features::` namespace.

AX-Relnotes: n/a.
Change-Id: Id9126a95dfbc533d4778b188b659b5acc9b3d9e3
Bug: None
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4836057
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Commit-Queue: Arthur Sonzogni <arthursonzogni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1194718}
2023-09-11 08:32:12 +00:00
Francois Doray
3fcb204e17 Set CPU security mitigations state before SysInfo::NumberfOfProcessors().
Today, SysInfo::NumberfOfProcessors() is called by the constructor of
RenderProcessImpl (via GetThreadPoolInitParams()) before calling
base::SysInfo::SetIsCpuSecurityMitigationsEnabled(). This means that
the value returned by SysInfo::NumberfOfProcessors() doesn't take into
account the fact that CPU security mitigations are enabled.

With this CL, SetCpuSecurityMitigationsEnabled() is called in
RendererMain, before creating the RenderProcessImpl. Checks are added
to prevent calls to SysInfo::NumberfOfProcessors() before a call to
SetCpuSecurityMitigationsEnabled(). Finally, the cache in
SysInfo::NumberOfProcessors() is removed, to allow different values to
be returned when the state of CPU security mitigations varies over the
life of a test process (the cache was added to avoid tripping sandbox
restrictions which are no longer in place
https://codereview.chromium.org/67373006).

Bug: 997677
Change-Id: I59d2807444acad646389663e89f36b913d49ec6e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4521664
Commit-Queue: Francois Pierre Doray <fdoray@chromium.org>
Reviewed-by: Alexander Timin <altimin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1153242}
2023-06-05 15:33:21 +00:00
Adam Klein
8c7452e87a Remove reference to always-true V8 flag --harmony-sharedarraybuffer
The V8 flag has been true for years, and will be removed
in https://crrev.com/c/4429630.

Other flags/origin trial callbacks handle appropriately hiding the
SharedArrayBuffer from contexts that aren't cross-origin-isolated.

Change-Id: I426afe43a03e809d9a6f19ad1616011a27184fd7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4428848
Commit-Queue: Adam Klein <adamk@chromium.org>
Reviewed-by: Antonio Sartori <antoniosartori@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Code-Coverage: Findit <findit-for-me@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#1131566}
2023-04-17 23:34:59 +00:00
Adam Klein
d4c0288e4e Stop setting always-true V8 flag --harmony-atomics
This flag has been true for years, and will be removed
in V8 CL https://crrev.com/c/4416459.

Change-Id: I1e77186f1114e63a83afa0296c7aa6d6b9454c41
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4429314
Reviewed-by: Stefan Zager <szager@chromium.org>
Code-Coverage: Findit <findit-for-me@appspot.gserviceaccount.com>
Commit-Queue: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1130709}
2023-04-14 22:22:42 +00:00
Matthias Liedtke
731a77cdfe Add chrome://flags flag for WebAssembly stringref
Bug: v8:12868
Change-Id: I611f19dd78a15db0df2b53363ac37be15da2261c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4329028
Auto-Submit: Matthias Liedtke <mliedtke@chromium.org>
Commit-Queue: Camille Lamy <clamy@chromium.org>
Reviewed-by: Camille Lamy <clamy@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1117011}
2023-03-14 16:11:33 +00:00
Andreas Haas
b656bfba5a [v8] Improve V8 flag configuration to avoid errors
In the past repeatedly errors happened where flags were set in V8 but
got overridden unexpectedly by blink. With this CL, the default value
of a blink flag cannot override the default value of a V8 flag anymore.
Only if a blink flag is set explicitly does the V8 flag get overridden.

This implementation already existed in gin/v8_initializer.cc.

Change-Id: Ia8c89bf517525daf0a1492e6bfcc734f073b84dd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4306685
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1113059}
2023-03-03 23:29:09 +00:00
Avi Drissman
adac219925 Update header includes for /base/functional in /content
bind.h, callback.h, callback_forward.h, and callback_helpers.h
moved into /base/functional/. Update the include paths to
directly include them in their new location.

Bug: 1364441
Change-Id: I32ec425b9c0e52ec4b50047bf3290fecc5c905ff
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4148554
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Auto-Submit: Avi Drissman <avi@chromium.org>
Owners-Override: Avi Drissman <avi@chromium.org>
Owners-Override: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1091567}
2023-01-11 23:46:39 +00:00
Francis McCabe
cfc1e47dfb Change name of WebAssemblyStackSwitching flag
Changed to ExperimentalWebAssemblyJSPI

Because JavaScript Promise Integration is all that is implemented at the moment.

Bug: v8:12191
Change-Id: Ida48722b0b8f38a6b7633b288ffeb8bb588eb5dd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4140086
Commit-Queue: Francis McCabe <fgm@chromium.org>
Reviewed-by: Charlie Reis <creis@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1090554}
2023-01-09 22:55:49 +00:00
Clemens Backes
5bc1ef00b4 [cleanup] Remove wasm memory protection feature flags
We added two memory protection feature flags for a finch trial when
rolling out PKU-based memory protection. They are not needed any more,
and since mprotect-based protection is off by default everywhere now, we
cannot ensure correctness of that configuration any more.

R=mlippautz@chromium.org

Bug: v8:13632
Change-Id: I6d52dff6f8b89fce80fe58c1006d1929f0f7b4c2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4110994
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1088716}
2023-01-04 14:59:57 +00:00
Adam Klein
adbd0ef9af Add chrome://flags flag for WasmGC
Bug: 1400452
Change-Id: I64bd6ef5c7ff9c7f05173b3476ee6aeabc7b9329
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4098692
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Commit-Queue: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1083448}
2022-12-15 00:07:15 +00:00
Deepti Gandluri
377ba8cc19 [wasm] Add flag for WebAssembly Relaxed SIMD
Add a flag to enable the use of Relaxed SIMD opcodes
https://github.com/WebAssembly/relaxed-simd

Bug: v8:12284
Change-Id: I76795fa2d46dde2abf0b4127141127daf4c372da
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4021553
Reviewed-by: Adam Klein <adamk@chromium.org>
Reviewed-by: Nasko Oskov <nasko@chromium.org>
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1070367}
2022-11-11 18:09:38 +00:00
Adam Klein
508dd715b0 Simplify and harden flag handling for Wasm stack-switching
Simplification: V8 enables type reflection when stack switching is
enabled, so there's no need to set the type reflection flag from
Chromium.

Hardening: when the stack switching flag is disabled in Chromium,
ensure that it's also disabled in V8.

Bug: v8:12191
Change-Id: I031c3a3a3620fe981dad85d1bca00f386ef94a29
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3956653
Auto-Submit: Adam Klein <adamk@chromium.org>
Commit-Queue: Stefan Zager <szager@chromium.org>
Reviewed-by: Stefan Zager <szager@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1061857}
2022-10-20 22:36:10 +00:00
Adam Klein
7e39952c3c Remove Chromium feature flag for SIMD
It's been enabled by default since Chrome 91.

Bug: v8:6020
Change-Id: I47d07bed2446fd2e3e6be48b8491dbc9f4fe3933
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3957477
Reviewed-by: Charlie Reis <creis@chromium.org>
Auto-Submit: Adam Klein <adamk@chromium.org>
Commit-Queue: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1059541}
2022-10-14 23:59:08 +00:00
Elad Alon
44e9423d1b Deprecate enterprise policy: DisplayCapturePermissionsPolicyEnabled
The permission policy was originally introduced to ensure that
hypothetical non-spec-compliant enterprise applications would
not be broken by Chrome's introduction of the display-surface
permissions policy. Such apps have had ample time to fix
the issue. It's also observed that the policy is seeing
incredibly low usage as of the last month, and should
therefore be safe to deprecate.

Bug: 1233969
Change-Id: I5d4fe59d15e3ea74bba0b2559f33e517a2ec97c8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3941642
Commit-Queue: Elad Alon <eladalon@chromium.org>
Reviewed-by: Julian Pastarmov <pastarmovj@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Yoav Weiss <yoavweiss@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1058107}
2022-10-12 17:07:21 +00:00
Francis McCabe
df4456d93a Enable stack switching flag for arm64
Bug: v8:12191
Change-Id: Ia6f5b636baa7e3572271a940ce4a5a2c07721c84
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3928134
Reviewed-by: Charlie Reis <creis@chromium.org>
Commit-Queue: Francis McCabe <fgm@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1054917}
2022-10-04 20:42:32 +00:00
Shu-yu Guo
849d4b1fb1 Ship JavaScript Array grouping
I2S with 3 LGTMs at
https://groups.google.com/a/chromium.org/g/blink-dev/c/hSnGUOXTXPE/m/IcP21RpVCAAJ

Bug: v8:12499
Change-Id: Id1e736efbec735d389cc6b163950bc10a205ae80
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3914361
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Charlie Reis <creis@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1050806}
2022-09-23 22:39:00 +00:00
Alex Attar
8990259674 Feature to return the number of "physical" cores when mitigation is
enabled on Mac.

If we are not able to establish if we are in mitigation mode fall back
to returning number of "logical" cores.

Bug: 997677
Change-Id: I8ccc4fefa8e494051dbc1f241548962cb02eefbb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3714401
Commit-Queue: Alex Attar <aattar@google.com>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Francois Pierre Doray <fdoray@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1048590}
2022-09-19 14:13:26 +00:00
Avi Drissman
4e1b7bc33d Update copyright headers in content/
The methodology used to generate this CL is documented in
https://crbug.com/1098010#c34.

No-Try: true
No-Presubmit: true
Bug: 1098010
Change-Id: I8c0f009d16350271f07d8e5e561085822cc9dd27
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3895935
Owners-Override: Avi Drissman <avi@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
Auto-Submit: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1047456}
2022-09-15 14:03:50 +00:00
Shu-yu Guo
b5461a51c0 [shared-struct] Add experimental JS shared memory features flag
Bug: chromium:1351118, v8:12547
Change-Id: Id640ce8e412fa1e8b91bc794da1bf0930274e21a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3863811
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Charlie Reis <creis@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1042413}
2022-09-02 01:22:24 +00:00
Clemens Backes
f6783cc42f [v8] Remove always-on flag
The V8 --freeze-flags-after-init flag is turned on by default since
https://crrev.com/c/3695264, hence we do not need to set it
explicitly any more from Chrome.

This CL reverts https://crrev.com/c/3687671.

R=haraken@chromium.org

Bug: v8:12887
Change-Id: I42a695fde83f28eae6a02f64e65a1f723fcd7d94
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3711764
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1040388}
2022-08-29 13:17:40 +00:00
Daniel Libby
5c21c12877 Remove kJSONModules
The feature shipped over a year ago in M91. Remove the base::Feature and
relevant code, and unconditionally enable --harmony-import-assertions.

https://chromestatus.com/feature/5749863620804608

Bug: 964248
Change-Id: I1edf293bfb78e298c5626b84f9efb83a4ad6c276
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3852553
Reviewed-by: Mason Freed <masonf@chromium.org>
Commit-Queue: Daniel Libby <dlibby@microsoft.com>
Reviewed-by: Dan Clark <daniec@microsoft.com>
Reviewed-by: Kouhei Ueno <kouhei@chromium.org>
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1039151}
2022-08-25 09:05:45 +00:00
Wez
02cedeba88 [dcheck] Make DCHECK_IS_CONFIGURABLE a buildflag
Change-Id: I50a282a220128a6a3f130207d38ebd134a81f44a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3658792
Auto-Submit: Wez <wez@chromium.org>
Reviewed-by: Benoit Lize <lizeb@chromium.org>
Owners-Override: Wez <wez@chromium.org>
Commit-Queue: Wez <wez@chromium.org>
Reviewed-by: Peter Boström <pbos@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1028214}
2022-07-26 12:48:38 +00:00
Peter Kasting
12bf330e29 Prevent unsafe narrowing: base/task
Bug: 1292951
Change-Id: I0996dc0eff7aaf23753acf7f895c7294bc964189
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3688583
Commit-Queue: danakj <danakj@chromium.org>
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Owners-Override: danakj <danakj@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Auto-Submit: Peter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1011619}
2022-06-07 19:52:07 +00:00
Clemens Backes
bc1ea052dd [v8] Freeze flags after initialization
This enables the --freeze-flags-after-init V8 flag, which disallows any
flag updates after V8 initialization. This is still disabled by default
in V8, but we can already enable it for the renderer process.
Once it's enabled by default in V8, this change can be reverted.

For now, flag updates are only disallowed by an explicit CHECK. In the
future, the protection will be hardened by actually memory-protecting
the memory area that holds flag values.

R=haraken@chromium.org
CC=​sroettger@google.com, cbruni@chromium.org

Bug: v8:12887
Change-Id: I64644110e5e83d3db4e4b7389945966d1bd90ae3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3687671
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1011456}
2022-06-07 15:15:00 +00:00
Joe Mason
94bebf1504 Always create ThreadPool before calling PostEarlyInitialization
This patch creates ThreadPool earlier, so that it's guaranteed to exist
before creating field trials. Now both field trials and the ThreadPool
always exist in PostFieldTrialInitialization.

A followup patch will use this entry point to start the heap profiler
in child processes.

Bug: 1327069
Change-Id: I2258fb77f06557460e342144e1c76de13985a4c4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3654912
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Commit-Queue: Joe Mason <joenotcharles@google.com>
Reviewed-by: Gabriel Charette <gab@chromium.org>
Reviewed-by: Greg Thompson <grt@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1010574}
2022-06-03 15:03:53 +00:00
Francis McCabe
f35488362f [wasm] Adding experimental stack switching flag
This will allow testing of stack switching in chrome as well as v8

Bug: v8:12191
Change-Id: I2cd8805378a407505cf86ae1adeed540f0cedfc4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3657595
Commit-Queue: Francis McCabe <fgm@chromium.org>
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Charlie Reis <creis@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1007843}
2022-05-26 15:11:27 +00:00
John Abd-El-Malek
0a1fa3181d Remove code for experimenting with running on big cores.
Bug: 1257237
Change-Id: I48c61f70401f8e8c1181cf985f15fe97b43eac4e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3658209
Reviewed-by: Eric Seckler <eseckler@chromium.org>
Auto-Submit: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Nate Fischer <ntfschr@chromium.org>
Commit-Queue: John Abd-El-Malek <jam@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1007076}
2022-05-24 21:44:46 +00:00
Justin Novosad
4154a28861 Remove the --enable-unsafe-fast-api-calls flag
This flag was redundant with the V8TurboFastApiCalls feature flag, so we
don't need it. This CL also removes test suites that were using the
flag since they have become useles now that the feature is enabled
by default.

There are still perf test suites that run with the feature enabled vs
disabled (via the feature flag).  Those were not removed so that we
continue to get data regarding the performance improvements provided by
fast calls.

BUG=1286813

Change-Id: Ic05bac9e6672fc23c0ad42fa57fb8ff9a9cc4e15
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3632518
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Justin Novosad <junov@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1003113}
2022-05-13 14:28:17 +00:00
Clemens Backes
0107d057fc [v8][wasm] Enable dynamic tiering by default
The feature is finching since a while on all channels, so we enable it
by default now and then ship via finch.

Since the flag is also enabled by default in V8
(https://crrev.com/c/3568449), we need to explicitly disable it if the
chromium feature is disabled (e.g. via the command line or via a finch
config).

R=creis@chromium.org

Bug: v8:12281, chromium:1255660
Change-Id: Iad7500f009d37051abe5f19233aba21889b2df57
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3568544
Reviewed-by: Charlie Reis <creis@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#989355}
2022-04-06 10:09:19 +00:00