This file has a transitive dependency on ostream via
base/numerics/safe_conversions.h. The ostream include in
safe_conversions.h is however unused and should be removed.
The <ostream> include is needed by the `CHECK*(...) << "..."`
statements. base/check.h only forward declares <ostream> by
including <iosfwd>. The documentation in base/check.h mentions:
// Additional information can be streamed to these macros and will be included
// in the log output if the condition doesn't hold (you may need to include
// <ostream>):
//
// CHECK(condition) << "Additional info.";
Change-Id: Id5f31c2ca010936bbae2aa512527940247cc787c
Bug: 1270812, 1372522
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4152491
Reviewed-by: Derek Schuff <dschuff@chromium.org>
Commit-Queue: Jean-Philippe Gravel <jpgravel@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1091466}
Turns out there's a lot of includes, so these will have to be removed
before deleting the implementation of the task runner handles.
To allow the deletion of the task runner handle headers, add
the sequenced/thread task runner handles where they are used in
the codebase with scripts.
This was done with an automated change, with a few touchups afterwards.
The code for the mass-refactor changes are here:
python:
https://paste.googleplex.com/5534570878337024
shell:
https://paste.googleplex.com/6466750748033024
In terms of touchups:
- add sequenced/thread task runner handles to
the third_party/blink/public/DEPS, because multiple files were using
it transitively anyways.
- rewrite certain parts of the codebase which used
ThreadTaskRunnerHandles instead of CurrentDefaultHandles.
- fix a compile issue with forward-declaration in
extensions/browser/extension_file_task_runner.h.
AX-Relnotes: n/a.
Bug: 1026641
Change-Id: I737ef32aee4e77c21eaa3a2bdc403a28322cf1b7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4133323
Owners-Override: Gabriel Charette <gab@chromium.org>
Commit-Queue: Sean Maher <spvw@chromium.org>
Commit-Queue: Gabriel Charette <gab@chromium.org>
Reviewed-by: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1090532}
This CL changes flow how all relevant parts decide to use new feature:
Before this CL every part would be querying
kDisablePPAPISharedImagesSwapChain command line flag and
PPAPISharedImagesSwapChain feature flag independently.
It's very complicated and error prone to apply this with enterprise
policy which is available only in browser process and needs to be
communicated via command line flags.
To simplify this now we query flag/feature only in the renderer
process. The value is communicated to nacl process during
initialization of Graphics3D via gpu::Capabilities. GPU process is now
ready to handle both flows.
Bug: 1342033
Change-Id: I5f0fd2ef5f63d4429c9ca273c8777d63ee462597
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4108070
Reviewed-by: Derek Schuff <dschuff@chromium.org>
Reviewed-by: ccameron chromium <ccameron@chromium.org>
Reviewed-by: Joe Mason <joenotcharles@google.com>
Commit-Queue: Vasiliy Telezhnikov <vasilyt@chromium.org>
Reviewed-by: Jonathan Ross <jonross@chromium.org>
Reviewed-by: Dominic Farolino <dom@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1084280}
Based on https://crbug.com/312380, it is no longer necessary to
provide a setuid sandbox, but the testing code is still setting it to
/opt/chromium/chrome_sandbox. This is a non-hermetic binary that is
installed to the test machines via puppet. If the setuid sandbox
environment variable is set, it causes fatal error if it is set to a
non-existent file, which can happen if setup on an Android machine fails
since this results in it reporting itself as a Linux machine and it does not contain the sandbox binary. Since the binary is not actually
necessary, this removes an unnecessary failure mode from the automated
testing.
Bug: 1334743
Change-Id: I1155d8e77e2417b34bf1a03afbb6e821bb4ecb85
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4077067
Reviewed-by: Ben Pastene <bpastene@chromium.org>
Commit-Queue: Garrett Beaty <gbeaty@google.com>
Reviewed-by: Mark Seaborn <mseaborn@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1079418}
This CL implements SetDefaultFramebufferSharedImage IPC on the command
buffer that allows callers to set SharedImage and associated params
like need of depth/stencil buffer and samples count to the default
framebuffer (fbo 0).
NaCL host side maintains pool of SharedImages that it uses with new
IPC to draw to the framebuffer.
Both sides are guarded by feature flag (kPPAPISharedImagesSwapChain) and
command line flag (kDisablePPAPISharedImagesSwapChain) that can veto
the feature flag. Extra command line is needed for enterprise policy.
Bug: 1342033
Change-Id: Iccf800d1bbe8dcd1f168272651ae32c27833c2ae
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4006326
Reviewed-by: Sunny Sachanandani <sunnyps@chromium.org>
Reviewed-by: Colin Blundell <blundell@chromium.org>
Commit-Queue: Vasiliy Telezhnikov <vasilyt@chromium.org>
Reviewed-by: Joe Mason <joenotcharles@google.com>
Reviewed-by: Kyle Charbonneau <kylechar@chromium.org>
Reviewed-by: Derek Schuff <dschuff@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1078120}
While looking at the presubmit --all bot's output for easy fixes I
noticed a huge number of errors of this form - 689 in total as it turns
out:
PPAPI Interface modified without updating NaCl SDK.
(note that some dev interfaces should not be added the NaCl SDK; when in doubt, ask a ppapi OWNER.
To ignore a file, add it to IGNORED_FILES in native_client_sdk/src/build_tools/verify_ppapi.py)
usage: verify_ppapi.py [-h] sources [sources ...]
verify_ppapi.py: error: the following arguments are required: sources
I focused on the first paragraph, which was unfortunate because the
second paragraph was trying to give me a hint. I couldn't reproduce the
errors on Windows so I switched to Linux, and eventually it all made
sense.
Change crrev.com/c/3810377 (which I reviewed) deleted the zero from
this line:
range(0, len(nacl_sdk_files), files_per_command):
This changed it to:
range(len(nacl_sdk_files), files_per_command):
Unfortunately that causes the checks to be skipped on Windows, and to
run as NOPs on Linux, roughly ~700 times, because nacl_sdk_files has
about 300 entries, and files_per_command is 25 on Windows and 1,000
elsewhere.
Easy fix. Put the zero back.
Bug: 1222512
Change-Id: Ie2aad6f4130089547e6cde0f9c6291e44bc106c8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4065121
Reviewed-by: Derek Schuff <dschuff@chromium.org>
Auto-Submit: Bruce Dawson <brucedawson@chromium.org>
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
Commit-Queue: Derek Schuff <dschuff@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1077236}
In particular, use base::Value::List to access lists, instead of
deprecated accessors on base::Value. Also pass Values by value instead
of using unique_ptrs.
Bug: 1338341
Change-Id: Ic162ddd5d9caec454a725d66e3352c5a30167090
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4060546
Reviewed-by: Derek Schuff <dschuff@chromium.org>
Commit-Queue: Matt Menke <mmenke@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1076236}
Header files that do not contain "RefCounted" and do not contain
scoped_refptr do not need to include base/memory/ref_counted.h. Remove
it and do IWYU to fix the build.
Bug: 242216
Change-Id: Ie70e43b0c926b8ef610419c99f43eea991ac8d81
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4005763
Reviewed-by: Kyle Charbonneau <kylechar@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Owners-Override: Kyle Charbonneau <kylechar@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1067592}
Using the macros instead of directly using `SequenceChecker` results in
smaller binaries and decreased memory usage. Most code already uses the
macros. This CL is part of a series of CLs that fixes remaining usages.
This CL was uploaded by git cl split.
R=dschuff@chromium.org
Bug: none
Change-Id: I2b77c5d704b39d087529c3e3b002188c1915baf3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3883904
Reviewed-by: Derek Schuff <dschuff@chromium.org>
Commit-Queue: Derek Schuff <dschuff@chromium.org>
Auto-Submit: Christian Flach <cmfcmf@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1045215}
Chrome is being migrated to the Perfetto tracing library, which
requires all categories to be statically declared. So we have to use
an existing category for test trace events.
Bug: b/214976389
Change-Id: I84390138a7c2b407d7749a26f3bf8eb79f1fd558
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3864557
Commit-Queue: Mikhail Khokhlov <khokhlov@google.com>
Reviewed-by: Derek Schuff <dschuff@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1043130}
Enables working PDF support on Fuchsia by setting enable_plugins=true
(but enable_ppapi=false); enable_pdf is already true for Fuchsia.
As a workaround, this change uses plugins_linux.json for the
IDR_PLUGIN_DB_JSON resource required by PluginFinder. This should be
harmless, since this file only has entries for Flash (which is
deprecated) and the PDF viewer (which we want). PluginFinder eventually
should be removed completely (see crbug.com/1064647).
Fixed: 1273277
Fuchsia-Binary-Size: Unavoidable //content increase due to plugins.
Change-Id: I4dd4680261fdca934780589dea745aceeec48949
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3827815
Reviewed-by: Derek Schuff <dschuff@chromium.org>
Reviewed-by: Nasko Oskov <nasko@chromium.org>
Reviewed-by: David Dorwin <ddorwin@chromium.org>
Commit-Queue: K. Moon <kmoon@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1038382}
NaCl cannot depend on //skia when building for ARM64, as in that build
some libraries are not present in the 32-bit version that NaCl needs.
Therefore, build some (parts of) files only in builds that are not for
nacl_helper.
Introduce a new buildflag IS_MINIMAL_TOOLCHAIN. This is to limit
dependencies in .h/.cc files if we build nacl_helper for ARM64.
Use nogncheck for such conditional includes as gn does not run the
preprocessor.
Test: Build nacl_helper for Linux ARM64
Bug: 1339021
Change-Id: Id95147bc134e34fbae91af3d540ed30a4e96b512
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3829145
Reviewed-by: Mustafa Emre Acer <meacer@chromium.org>
Commit-Queue: Fabian Sommer <fabiansommer@chromium.org>
Reviewed-by: Derek Schuff <dschuff@chromium.org>
Reviewed-by: Mark Seaborn <mseaborn@chromium.org>
Reviewed-by: vikas soni <vikassoni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1037644}
NaCl cannot depend on //net when building for ARM64, as in that build
some libraries are not present in the 32-bit version that NaCl needs.
Introduce is_minimal_toolchain build variable to distinguish our special
nacl_helper build.
Bug: 1339021
Change-Id: Ic1d37002e16c2a7a8e2479a39463454f805633c1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3819701
Reviewed-by: Mark Seaborn <mseaborn@chromium.org>
Reviewed-by: Derek Schuff <dschuff@chromium.org>
Commit-Queue: Fabian Sommer <fabiansommer@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1036017}
This CL represents some minimal effort to un-block the codebase wide
migration of PRESUBMIT.py to Python3. It does not migrate the full suite
of PPAPI to Python3.
Tested with `git cl presubmit --force --file "ppapi/*" --verbose` and no
Python related warnings/errors.
Bug: 1222512
Change-Id: Ic121d5ea10284f13c78e517cd49f631ccb70744c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3810377
Commit-Queue: William Liu <liuwilliam@chromium.org>
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Reviewed-by: Derek Schuff <dschuff@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1032529}
Adds an "enable_ppapi" GN arg distinct from the "enable_plugins" GN arg.
This allows separating plugin support (required by the PDF viewer) from
Pepper API support (which is not supported on platforms like Fuchsia).
Bug: 1306610
Change-Id: I574e391d06e56167949bb991d42c7c314fc166fc
Cq-Do-Not-Cancel-Tryjobs: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3733394
Reviewed-by: Derek Schuff <dschuff@chromium.org>
Commit-Queue: K. Moon <kmoon@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1019785}
This commit modifies sprintf calls to fix the following compilation
errors using XCode 14.0 beta on MacOS:
> 'sprintf' is deprecated: This function is provided for compatibility
> reasons only. Due to security concerns inherent in the design of
> sprintf(3), it is highly recommended that you use snprintf(3) instead.
Bug: 1334739
Change-Id: Id4df7e320860ed0b5ecc3efd6b6647dcc8200a33
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3716608
Owners-Override: Nico Weber <thakis@chromium.org>
Commit-Queue: Frédéric Wang <fwang@igalia.com>
Reviewed-by: Nico Weber <thakis@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1016704}
Catch situations where computing the byte size of the incoming array
would overflow.
Beyond this, detect failures to allocate space in CommandBufferHelper.
In this situation, persistently lose the context client-side. Remove
DCHECKs preventing these guards from being reached.
Add new feature to disable ArrayBuffer size restrictions for testing.
Use it in the new test; it is required for it to pass.
Bug: 1316368
Bug: 1201109
Change-Id: Ic345aed296e2d9a3f44e33c4c207e12b64c4f312
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3688833
Commit-Queue: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Derek Schuff <dschuff@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Gregg Tavares <gman@chromium.org>
Reviewed-by: Victor Miura <vmiura@chromium.org>
Reviewed-by: Martin Kreichgauer <martinkr@google.com>
Cr-Commit-Position: refs/heads/main@{#1014267}
Delete CHROMIUM GL extensions that were added for swap, presentation and
overlay control from GLRenderer. These extensions are no longer needed
now that GLRenderer has been deleted.
Bug: 1247756
Change-Id: I9df77e118cd4798713dc2684566f0f5eba06006b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3669573
Reviewed-by: Sunny Sachanandani <sunnyps@chromium.org>
Reviewed-by: Derek Schuff <dschuff@chromium.org>
Commit-Queue: Kyle Charbonneau <kylechar@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1009927}
verify_ppapi.py was already Python 3 compatible but was still being run
under Python 2 because python_executable was specified instead of
python3_executable. This changes that.
Bug: 1313804
Change-Id: Ia353fd8133dc786a49c90fd4ce4983fe356b146c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3648886
Reviewed-by: Derek Schuff <dschuff@chromium.org>
Auto-Submit: Bruce Dawson <brucedawson@chromium.org>
Commit-Queue: Derek Schuff <dschuff@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1003791}
CreateImageCHROMIUM() is no longer used. Delete the extension and all
GLES2Interface functions related to it. Also delete plumbing through
various layers of GPU and IPC code related to it.
Remove references to the extension from other extensions as well.
Bug: 1216120
Change-Id: Ia55ad5d2f85f27c9d337ac928daf5fc614dc9b75
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3582497
Reviewed-by: Derek Schuff <dschuff@chromium.org>
Commit-Queue: Kyle Charbonneau <kylechar@chromium.org>
Reviewed-by: Sunny Sachanandani <sunnyps@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/main@{#999958}
Three PPAPI header files TODOs that have been there for a while. In
order to allow "git cl presubmit --all" to run without errors the error
regarding these needs to be downgraded to a warning. This error/warning
can most easily be reproduced with this command:
git cl presubmit --files=ppapi\cpp\graphics_2d.h;ppapi\cpp\input_event.h;ppapi\cpp\module.h
If the TODOs get removed then this could be upgraded back to an error,
but a warning is probably fine even then.
Bug: 1309977
Change-Id: I561dc9660dd9eb41a6357632b698b15af3ffd605
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3606316
Reviewed-by: Derek Schuff <dschuff@chromium.org>
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
Cr-Commit-Position: refs/heads/main@{#996439}
The python scripts to generate GLES2/raster/WebGPU command buffer was
still running with vpython which is 2.7. Update the PRESUBMIT to run
with python3 and fix python3 compatibility issues.
Bug: none
Change-Id: Ibe11208afb11bfe9870dc261865a7c909f76bde2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3577186
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: Derek Schuff <dschuff@chromium.org>
Commit-Queue: Kyle Charbonneau <kylechar@chromium.org>
Cr-Commit-Position: refs/heads/main@{#991501}
When running "git cl presubmit --all" command-line length limit errors
were found in CheckUpdatedNaClSDK - the command line exceeded the
cmd.exe limit of 8191 characters. This can most easily be seen by
running this command:
git cl presubmit --files=ppapi\* --force -v
See crrev.com/c/3554633 for another example of fixing this issue.
Bug: 1309977
Change-Id: I08d5bb6cc8ba14739a12b26e0b2a756362e0c50f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3579096
Reviewed-by: Derek Schuff <dschuff@chromium.org>
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
Cr-Commit-Position: refs/heads/main@{#991281}
In some cases, the IRT was getting built with is_nacl_irt set to
false. In those cases, the compiler flags set by
build/config/nacl/BUILD.gn (by :compiler_codegen and :irt_optimize)
were not being applied.
This fixes two cases where the IRT architecture is different from the
chrome executable's architecture:
1) ARM32 NaCl in ARM64 Chromium (on Linux or Chrome OS). The problem
causes "-fasynchronous-unwind-tables" to be omitted, which creates an
IRT that leads to a crash when running the test
PPAPINaClNewlibTest.PostMessage. The output I got from the test was:
...
[1,4142801984:00:05:39.834116] NaClSysThreadCreate: Bad function pointer
[1,4142801984:00:05:39.834221] NaClSysThreadCreate: Bad function pointer
[1,4142801984:00:05:39.834255] NaClSysThreadCreate: Bad function pointer
[1,4142801984:00:05:39.834285] NaClSysThreadCreate: Bad function pointer
** Signal 11 from untrusted code: pc=1d3474
[1903:1903:0405/000539.939548:ERROR:nacl_process_host.cc(265)] NaCl process exited with status 62720 (0xf500)
I am not sure why that happens, but it looks like an ARM-specific
problem, maybe a miscompile.
2) x86-64 NaCl in Windows x86-32 Chromium. There don't seem to be any
correctness problems in this case, but having is_nacl_irt==false
causes the IRT to be built with "-O2" instead of "-Os", which makes it
larger than necessary. The lack of "-fasynchronous-unwind-tables"
shouldn't make a difference because "-fasynchronous-unwind-tables" is
the default on x86-64.
Fix by using current_cpu instead of target_cpu.
Remove an unnecessary assignment to is_nacl_cpu.
Add an assertion as a consistency check to catch the problem of
is_nacl_irt being false.
Bug: 1299021
Test: I ran the test above on ARM64 Ubuntu on a Raspberry Pi
Change-Id: I4f4966bd8fa5359527ab8b91152048e584ed0340
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3575687
Reviewed-by: Derek Schuff <dschuff@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Commit-Queue: Mark Seaborn <mseaborn@chromium.org>
Cr-Commit-Position: refs/heads/main@{#990482}
Also build nacl_helper_bootstrap the same way.
This uses the same pattern as in other BUILD.gn files: Change
loader/BUILD.gn so that when it's built for ARM64, it redirects to
itself to build with the ARM32 toolchain. Its ARM64 invocation copies
the files from the ARM32 invocation. This pattern is also used for
building the IRT and for building nacl64.exe on Windows.
Update pnacl_support_extension to use the right target CPU in ARM64
builds.
Bug: 1299021
Change-Id: I76b6d5635402ff06cbf2ca2e06ad64a7affad42b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3570399
Reviewed-by: Derek Schuff <dschuff@chromium.org>
Commit-Queue: Mark Seaborn <mseaborn@chromium.org>
Cr-Commit-Position: refs/heads/main@{#989460}