This reverts commit 7ad9365ab4.
Reason for revert: Breakage in https://ci.chromium.org/ui/p/chromium/bisection/test-analysis/b/5295039715475456
Original change's description:
> Reimplement "Push non-official CHECK_op failures into lambda"
>
> This new implementation seems simpler and doesn't tickle the same msan
> bugs that the original changelist got reverted for. In this solution
> ::Check##name##Impl returns two strings on failure (likely inlined
> anyways) instead of a single pointer and the caller can construct the
> check-failure object.
>
> Original change's description:
> > Revert "Push non-official CHECK_op failures into lambda"
> >
> > This reverts commit a5911aa482.
> >
> > Reason for revert: This breaks some tests on Linux MSAN. Please see crbug.com/384553537 for more details.
> >
> > Original change's description:
> > > Push non-official CHECK_op failures into lambda
> > >
> > > This seems to generate significantly better code in the hot spot of a
> > > fuzzer (~800 ms instead of ~1200 ms). If we're lucky it also translates
> > > some to real-world performance of developer and official-DCHECK builds.
> > > This is believed to be because most of the code for the failure path
> > > can get out-of-lined by the compiler now.
> > >
> > > This also intends to out-of-line the "foo < bar" string from in the hot
> > > spot of a CHECK_op macro which hopefully means less parameter passing.
> > >
> > > Bug: 40241607, 382071730
> > > Change-Id: I9a4bbef3e3a77280056e158fb215647656a8c00f
> > > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6095761
> > > Reviewed-by: Peter Kasting <pkasting@chromium.org>
> > > Commit-Queue: Peter Boström <pbos@chromium.org>
> > > Code-Coverage: findit-for-me@appspot.gserviceaccount.com <findit-for-me@appspot.gserviceaccount.com>
> > > Cr-Commit-Position: refs/heads/main@{#1396998}
> >
> > Bug: 384553537, 40241607, 382071730
> > Change-Id: Ibd85c1dbea710fc7585d08ac86fcf9ad7af1ba47
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6097359
> > Owners-Override: Taiyo Mizuhashi <taiyo@chromium.org>
> > Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> > Reviewed-by: thefrog <thefrog@chromium.org>
> > Commit-Queue: thefrog <thefrog@chromium.org>
> > Cr-Commit-Position: refs/heads/main@{#1398076}
>
> Bug: 384553537, 40241607, 382071730
> Change-Id: Ie5663afbabda3eccbd01656617bd889169e8cd8b
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6124647
> Reviewed-by: Peter Kasting <pkasting@chromium.org>
> Commit-Queue: Peter Boström <pbos@chromium.org>
> Owners-Override: Peter Boström <pbos@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1401663}
Bug: 384553537, 40241607, 382071730
Change-Id: Ic79f8dca5e80f155de2f886709de0d3cade2d54e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6124761
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Peter Boström <pbos@chromium.org>
Owners-Override: Peter Boström <pbos@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1401700}
This new implementation seems simpler and doesn't tickle the same msan
bugs that the original changelist got reverted for. In this solution
::Check##name##Impl returns two strings on failure (likely inlined
anyways) instead of a single pointer and the caller can construct the
check-failure object.
Original change's description:
> Revert "Push non-official CHECK_op failures into lambda"
>
> This reverts commit a5911aa482.
>
> Reason for revert: This breaks some tests on Linux MSAN. Please see crbug.com/384553537 for more details.
>
> Original change's description:
> > Push non-official CHECK_op failures into lambda
> >
> > This seems to generate significantly better code in the hot spot of a
> > fuzzer (~800 ms instead of ~1200 ms). If we're lucky it also translates
> > some to real-world performance of developer and official-DCHECK builds.
> > This is believed to be because most of the code for the failure path
> > can get out-of-lined by the compiler now.
> >
> > This also intends to out-of-line the "foo < bar" string from in the hot
> > spot of a CHECK_op macro which hopefully means less parameter passing.
> >
> > Bug: 40241607, 382071730
> > Change-Id: I9a4bbef3e3a77280056e158fb215647656a8c00f
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6095761
> > Reviewed-by: Peter Kasting <pkasting@chromium.org>
> > Commit-Queue: Peter Boström <pbos@chromium.org>
> > Code-Coverage: findit-for-me@appspot.gserviceaccount.com <findit-for-me@appspot.gserviceaccount.com>
> > Cr-Commit-Position: refs/heads/main@{#1396998}
>
> Bug: 384553537, 40241607, 382071730
> Change-Id: Ibd85c1dbea710fc7585d08ac86fcf9ad7af1ba47
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6097359
> Owners-Override: Taiyo Mizuhashi <taiyo@chromium.org>
> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> Reviewed-by: thefrog <thefrog@chromium.org>
> Commit-Queue: thefrog <thefrog@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1398076}
Bug: 384553537, 40241607, 382071730
Change-Id: Ie5663afbabda3eccbd01656617bd889169e8cd8b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6124647
Reviewed-by: Peter Kasting <pkasting@chromium.org>
Commit-Queue: Peter Boström <pbos@chromium.org>
Owners-Override: Peter Boström <pbos@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1401663}
This s/NOTREACHED()/NOTREACHED_IN_MIGRATION() for most of remaining
src/. Then I went through all changes and made sure that we didn't do
this for comments or "NOTREACHED(): " log strings.
Rolling in the corresponding change for remaining third_party/crashpad
is separately up for review.
Bug: 40580068
Low-Coverage-Reason: TRIVIAL_CHANGE Unreachable code is not reachable.
Change-Id: I707e582b710bf65474db2e3477fa06f5b8d8ea06
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5545807
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@{#1302866}
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.
third_party/crashpad is still excluded, needs to be changed upstream.
Bug: 40580068
Change-Id: Ia5dbaddf53dba2fedefb67f1d428e8b24e9edffe
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5545021
Commit-Queue: Peter Boström <pbos@chromium.org>
Auto-Submit: Peter Boström <pbos@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Owners-Override: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1302314}
This CL adds two new histograms that report more details on failed
SQLitePersistentStore DB initialization. These new metrics are
reported for both instantiations, ReportingAndNEL and Cookie.
The first, ErrorInitializeDB is the SQLite error code upon
initialization failure and is reported on all platforms.
The second, WinGetLastErrorInitializeDB is the ::GetLastError returned
on the DB thread after attempting to load the database, and is only
reported on Windows.
A test is added to verify this behavior, along with verifying that
the new histograms are only emitted in the failure case.
UmaHistogramSqliteResult is updated to take a const std::string ref
to match the underlying UMA functions being called.
BUG=1429117
Change-Id: I1bc2c898b005232305cebfde80a0dd8d4cfafd68
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4608890
Reviewed-by: Austin Sullivan <asully@chromium.org>
Reviewed-by: Chris Fredrickson <cfredric@chromium.org>
Commit-Queue: Will Harris <wfh@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1157192}
This CL introduces the following strongly typed enums, which are meant
to replace raw integers in Chrome's layer on top of SQLite.
* SqliteResultCode represents all result codes.
* SqliteErrorCode represent a result code that's known to be an error.
This CL integrates each new type in one place, to give an idea of what
our code will look like once we adopt these new types.
* SqliteResultCode is integrated in
Database::ExecuteAndReturnResultCode().
* SqliteErrorCode is integrated in Database::OnSqliteError().
The new enums are declared in //sql/sqlite_result_code.h, together with
helper functions for converting raw integers returned by the SQLite API.
The values for the new enums are defined in a separate header,
//sql/sqlite_result_code_values.h. This is intended to help readability,
as sqlite_result_code.h has everything developers need to start using
the types, while the boilerplate is relegated to
sqlite_result_code_values.h.
Last, this CL moves the SqliteLoggedResultCode logic from
error_metrics.{h,cc} into the newly introduced files. This is done in
part because this type is also a strongly typed replacement for SQLite's
result codes, and in part because we want all the SQLite result code
conversion logic to share one mapping table.
Bug: 1308290
Change-Id: I580ae4649cabccaab74c1d4749b5f349cf42f047
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3538180
Auto-Submit: Victor Costan <pwnall@chromium.org>
Reviewed-by: Austin Sullivan <asully@chromium.org>
Commit-Queue: Austin Sullivan <asully@chromium.org>
Cr-Commit-Position: refs/heads/main@{#983543}