|extend_columns| was intended to be used in the case where the target
schema differed slightly from the schema of the table being recovered.
Unfortunately, it actually implemented part of the solution for when the
target has fewer columns and described it as the solution for when the
target has more columns. Remove the unnecessary code and parameter.
[In general, table schema only add new columns, removing is more
infrequent.]
BUG=none
Review URL: https://codereview.chromium.org/1666473003
Cr-Commit-Position: refs/heads/master@{#373586}
This is a reland of https://codereview.chromium.org/1653003006/
Consolidating the _run targets into the test template should make them
easier to maintain (and, eventually, remove).
BUG=583694
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel
Review URL: https://codereview.chromium.org/1662053002
Cr-Commit-Position: refs/heads/master@{#373385}
The referenced bug is a crash which appears to happen when recovery is
attempted against a poisoned (or closed) database. Modify
sql::Recovery::Begin() to explicitly short-circuit recovery if the
passed connection handle is not open. Otherwise the recovery code will
work until the recovered data is restored over the original, and then
fail.
Also modify the sql::Connection::ReportDiagnosticInfo() to clear the
error callback while doing any integrity check. This is a bit of a
hack in the interests of not rooting out the crazy error-callback
assumptions at this time.
BUG=583106
Review URL: https://codereview.chromium.org/1657593005
Cr-Commit-Position: refs/heads/master@{#372896}
Work Chrome runs in environment without a proper mmap support.
Disable it for all work chrome.
BUG=554269
Review URL: https://codereview.chromium.org/1637683003
Cr-Commit-Position: refs/heads/master@{#372179}
Overview of the cleanup:
------------------------
- In the context of the discussion in https://goo.gl/K2m649 our
illustrious base/ owners suggested that having base being the only
target depending on allocator (and having the other targets inherit
that recursively) would be a more scalable solution, as opposite to
having to remember to add an exec -> allocator to each target.
- This base -> allocator dep landed in crrev.com/1616793003.
- After that CL, until this point, many targets got two paths that lead
to allocator:
1. The indirect one via base (content_shell -> base -> allocator)
which is what we want to preserve.
2. The direct one (content_shell -> allocator) which is the
inconsistent one we want to drop.
This CL gets rid of all the instances of 2.
The nice property of this sequencing of CLs is that the effect of this
large change on the final .ninja files is minimal. See details below.
Effect on the produced ninja files:
-----------------------------------
GYP, Linux, static build: https://paste.ee/p/RaJLj
Just some small reordering of include paths.
Dropping --rdynamic (as expected) in keyboard_unittests
GN, Linux, static build: https://paste.ee/p/zYtrQ
Various targets lose the dependency on allocator.stamp (expected, the
order is enforced by depending on base which depends on allocator.stamp)
GN, Android (both component and static are similar): https://paste.ee/p/Iq6DD
As above.
GN, Linux, component build: https://paste.ee/p/jHUmv
This is the most juicy change. As expected all the ODR goes away and
random targets stop re-linking tcmalloc .o files.
GYP, Win, static: https://paste.ee/p/j0IjL
Extremely minimal changes: All.ninja stops depending on libcmt.lib.
Sounds fine as base (which depends on that) is definitely depending on libcmt.
GN, Win, static: https://paste.ee/p/Q6zTo
Minimal change, like Linux GN, dropping dependencies on the .stamp files.
BUG=564618
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel
Review URL: https://codereview.chromium.org/1647453002
Cr-Commit-Position: refs/heads/master@{#372167}
Some mojo enums were previously not proper enums: they were constants
for bitfields. These have been replaced by const int32s in the mojoms:
- mus.mojom.EventFlags
- mus.mojom.MouseEventFlags
- mus.mojom.ResizeBehavior
- mus.mojom.WindowTree.AccessPolicy
Some mojo enum values now conflict with macros (mostly on Windows) and
needed to change:
- mus.mojom.Cursor.NULL became CURSOR_NULL (again)
- mus.mojom.KeyboardCode.DELETE became DELETE_KEY
- mus.mojom.WindowManagerErrorCode.ERROR_ACCESS_DENIED became
ACCESS_DENIED
- device.usb.TransferDirection.IN became INBOUND
- device.usb.TransferDirection.OUT became OUTBOUND
- device.usb.TransferStatus.ERROR became TRANSFER_ERROR
- device.NFCRecordType.OPAQUE became OPAQUE_RECORD
- media.interfaces.Decryptor.Status.ERROR became DECRYPTION_ERROR
- skia.AlphaType.OPAQUE became ALPHA_TYPE_OPAQUE
Review URL: https://codereview.chromium.org/1527183003
Cr-Commit-Position: refs/heads/master@{#370632}
The sql connection memory dump is not thread safe since the connections
can get deleted while a dump is happening. To make this thread safe,
this CL introduces a dump provider class owned by the connection. This
class holds a lock when dumping and deleting the database. Also, to
workaround thread safe dump provider registration, it uses the
UnregisterAndDeleteDumpProviderAsync api added in crrev.com/1430073002.
BUG=466141
Review URL: https://codereview.chromium.org/1434993002
Cr-Commit-Position: refs/heads/master@{#369161}
GetAppropriateMmapSize() is called to validate the database as
error-free before enabling memory-mapped mode. The validation status is
stored in the [meta] table, since new databases have no [meta] table it
previously defaulted to not turning on memory-mapping. Then on second
open the file would be validated.
This change uses the lack of [meta] table as a signal that the file is
new and should be safe to memory-map. Additionally the code creating
[meta] pre-populates that setting.
Additionally disable memory-mapped mode for databases which do not make
use of the [meta] table. This makes the existing settings explicit.
BUG=537742, 555578
TBR=rdevlin.cronin@chromium.org, michaeln@chromium.org, zea@chromium.org, sky@chromium.org
Review URL: https://codereview.chromium.org/1533703002
Cr-Commit-Position: refs/heads/master@{#365959}
The mmap mitigation for bug 537742 meant that the test wasn't running in
cases where mmap could potentially be enabled but wasn't enabled by
default. Change the test to instead run when the platform allows SQLite
mmap to be enabled.
Add a test to verify that mmap cannot be enabled in cases where it is
expected not to work, so that platforms must make an explicit decision
about whether to allow mmap.
BUG=537742, 554269
Review URL: https://codereview.chromium.org/1529693002
Cr-Commit-Position: refs/heads/master@{#365904}
The recent formatter alphebetizing change is causing a lot of noise in
code reviews. Figured it'd be worth a clean-up CL.
Exact command I ran:
find . -name "*.gn*" -exec gn format --in-place "{}" \;
TBR=ddorwin@chromium.org
BUG=554928
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel
Review URL: https://codereview.chromium.org/1464873002
Cr-Commit-Position: refs/heads/master@{#360891}
The aim is to make scoped_ptr and std::unique_ptr functionally
identical so scoped_ptr can simply be a typedef.
BUG=554298
Review URL: https://codereview.chromium.org/1445003002
Cr-Commit-Position: refs/heads/master@{#360539}
GetUniqueStatement() and GetUntrackedStatement() attempt to be
pedantic about errors preparing statements, because often those errors
indicate either a syntax error in the SQL being prepared, or an error
with the database schema it is being prepared against. That makes
testing code against various other problems like corruption
challenging. This change attempts to restrict the flagged errors to
include fewer errors unrelated to the form of the SQL statement (or
schema).
Additionally, slightly improve the debug output for OnSqliteError()
for databases which haven't been tagged.
BUG=537742
Review URL: https://codereview.chromium.org/1434173003
Cr-Commit-Position: refs/heads/master@{#359452}
With regular I/O, filesystem corruption would cause SQLite to return
SQLITE_IOERR codes. With memory-mapping, filesystem errors can cause a
crash when accessed. There are databases with filesystem corruption,
this CL only enables memory-mapped I/O for parts of the database which
have been successfully read at some point using regular I/O.
BUG=537742
Review URL: https://codereview.chromium.org/1426743006
Cr-Commit-Position: refs/heads/master@{#358672}
SQLite implements a hint to request the databases be truncated or
expanded to multiples of a chunk size. This was originally implemented
to reduce filesystem fragmentation, and it also can improve performance
because file sizes don't vary as much.
For a memory-mapped database, it also reduces the number of calls to
adjust the memory map when the database size changes.
BUG=551108
Review URL: https://codereview.chromium.org/1402373007
Cr-Commit-Position: refs/heads/master@{#358121}
Recovery may be used to recover files with I/O errors, which would not
interact well with memory-mapped I/O.
[AFAICT, SQLite doesn't use memory-mapped I/O on temporary files, but as
of yet I don't see why this might be.]
BUG=551110
Review URL: https://codereview.chromium.org/1414563010
Cr-Commit-Position: refs/heads/master@{#358083}
Follow-up CL to crrev.com/1425793002. Adds an extra |name|
argument to the memory-infra RegisterDumpProvider methods.
This allow to see the names of the dump providers in the trace
and diagnose dump providers getting stuck or taking more time
than usual.
No further behavioral change is introduced by this CL.
BUG=547764
TBR=xhwang@chromium.org,simonhatch@chromium.org,jochen@chromium.org,shess@chromium.org,piman@chromium.org
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel
Review URL: https://codereview.chromium.org/1406213005
Cr-Commit-Position: refs/heads/master@{#357089}
The ThumbnailDatabase error handler attempts to capture generic data
about the error, which is then uploaded for diagnostics with
DumpWithoutCrashing(). Database with errors which are not repaired
upload new dumps repeatedly. This change adds a tracking file alongside
the database file, which has the dual purpose of recording whether a
previous dump was attempted, and also verifying that files can be
created in the profile directory. If the profile directory is too
broken to create files, then diagnostic data is unlikely to inform a
fix.
BUG=543321,362505,526614,240396
Review URL: https://codereview.chromium.org/1393393007
Cr-Commit-Position: refs/heads/master@{#355632}
The process-wide memory usage statistics of sqlite library is added to
chrome://tracing. The memory usage of sqlite library is mainly through
sqlite_malloc. The total usage of the process is recorded by
sqlite3_memory_used() api. This CL also adds per-connection memory
usage to tracing. Each connection uses memory for cache, schema and
statement, and these usages are recorded. sqlit3_malloc uses malloc
internally to allocate memory. So, thie memory is traced as
sub-allocation from system_allocator(malloc).
This CL lets us keep track of sqlite memory usage in chrome telemetry.
BUG=466141
Review URL: https://codereview.chromium.org/1327063002
Cr-Commit-Position: refs/heads/master@{#353549}
This is a redo of https://codereview.chromium.org/1245873002c6649f2e01
with fix for Official build.
Further reduce the boilerplate in .isolate files and is necessary to add debug
symbols, to be done in a follow up.
Slightly accelerate ninja file parsing by blacklisting more extensions.
sbox_validation_tests wasn't run on Windows since
https://codereview.chromium.org/1212003003/ (~2 months ago). Thankfully this CL
uncovered this copy-paste error.
TBR=jam@chromium.org
BUG=98637
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel
Review URL: https://codereview.chromium.org/1320793004
Cr-Commit-Position: refs/heads/master@{#347912}
Further reduce the boilerplate in .isolate files and is necessary to add debug
symbols, to be done in a follow up.
Slightly accelerate ninja file parsing by blacklisting more extensions.
sbox_validation_tests wasn't run on Windows since
https://codereview.chromium.org/1212003003/ (~2 months ago). Thankfully this CL
uncovered this copy-paste error.
TBR=jam@chromium.org
BUG=98637
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel
Review URL: https://codereview.chromium.org/1245873002
Cr-Commit-Position: refs/heads/master@{#347027}
Reason for revert:
Suspected of breaking chromium.webkit Mac builders, see https://code.google.com/p/chromium/issues/detail?id=526208
Summary:
Incompatible library version: httpd requires version 9.0.0 or later, but libsqlite3.dylib provides version 0.0.0
/b/build/slave/WebKit_Mac10_6__dbg_/build/src/out/Debug/libsqlite3.dylib seems to be used instead of expected/intended /usr/lib/libsqlite3.dylib
Original issue's description:
> [sqlite] Respect the gyp and gn component switch.
>
> SQLITE_API is the existing mechanism SQLite provides, and is used in
> preference to inventing a new SQLITE_EXPORT symbol (like
> sql/sql_export.h and other examples).
>
> CoreServices.framework is necessary on OSX because of the Time Machine
> patch.
>
> Remove sql/proxy.{h,cc}, which was necessary to work around SQLite
> linking statically into both component shlibs and unit test executables.
>
> [Relanding https://codereview.chromium.org/1322463002/ ]
>
> BUG=489444
> TBR=michaeln@chromium.org, thakis@chromium.org, brettw@chromium.org
>
> Committed: https://crrev.com/f71db5c36625ff00feb8283028631303ae5caa7c
> Cr-Commit-Position: refs/heads/master@{#346536}
TBR=michaeln@chromium.org,thakis@chromium.org,brettw@chromium.org,shess@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=489444
Review URL: https://codereview.chromium.org/1325833003
Cr-Commit-Position: refs/heads/master@{#346615}
SQLITE_API is the existing mechanism SQLite provides, and is used in
preference to inventing a new SQLITE_EXPORT symbol (like
sql/sql_export.h and other examples).
CoreServices.framework is necessary on OSX because of the Time Machine
patch.
Remove sql/proxy.{h,cc}, which was necessary to work around SQLite
linking statically into both component shlibs and unit test executables.
[Relanding https://codereview.chromium.org/1322463002/ ]
BUG=489444
TBR=michaeln@chromium.org, thakis@chromium.org, brettw@chromium.org
Review URL: https://codereview.chromium.org/1306863006
Cr-Commit-Position: refs/heads/master@{#346536}
Reason for revert:
ARRGH! win8_chromium_gn_dgb is still broken.
Original issue's description:
> [sqlite] Respect the gyp and gn component switch.
>
> SQLITE_API is the existing mechanism SQLite provides, and is used in
> preference to inventing a new SQLITE_EXPORT symbol (like
> sql/sql_export.h and other examples).
>
> CoreServices.framework is necessary on OSX because of the Time Machine
> patch.
>
> Remove sql/proxy.{h,cc}, which was necessary to work around SQLite
> linking statically into both component shlibs and unit test executables.
>
> [Relanding https://codereview.chromium.org/1322463002/ ]
>
> BUG=489444
> TBR=michaeln@chromium.org, thakis@chromium.org
>
> Committed: https://crrev.com/02ce712af589a5b722ebbf5c2fffb3e0d4849963
> Cr-Commit-Position: refs/heads/master@{#346212}
TBR=michaeln@chromium.org,thakis@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=489444
Review URL: https://codereview.chromium.org/1307363007
Cr-Commit-Position: refs/heads/master@{#346213}
SQLITE_API is the existing mechanism SQLite provides, and is used in
preference to inventing a new SQLITE_EXPORT symbol (like
sql/sql_export.h and other examples).
CoreServices.framework is necessary on OSX because of the Time Machine
patch.
Remove sql/proxy.{h,cc}, which was necessary to work around SQLite
linking statically into both component shlibs and unit test executables.
[Relanding https://codereview.chromium.org/1322463002/ ]
BUG=489444
TBR=michaeln@chromium.org, thakis@chromium.org
Review URL: https://codereview.chromium.org/1325513002
Cr-Commit-Position: refs/heads/master@{#346212}
Reason for revert:
Broken build on the Builder: Win x64 GN (dbg).
Failure example: http://build.chromium.org/p/chromium.win/builders/Win%20x64%20GN%20%28dbg%29/builds/8549
Original issue's description:
> [sqlite] Respect the gyp and gn component switch.
>
> SQLITE_API is the existing mechanism SQLite provides, and is used in
> preference to inventing a new SQLITE_EXPORT symbol (like
> sql/sql_export.h and other examples).
>
> CoreServices.framework is necessary on OSX because of the Time Machine
> patch.
>
> Remove sql/proxy.{h,cc}, which was necessary to work around SQLite
> linking statically into both component shlibs and unit test executables.
>
> BUG=489444
>
> Committed: https://crrev.com/4ec68d9ad2d3e0c74967a17946c8bf7ed4450f73
> Cr-Commit-Position: refs/heads/master@{#346151}
TBR=michaeln@chromium.org,shess@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=489444
Review URL: https://codereview.chromium.org/1324523004
Cr-Commit-Position: refs/heads/master@{#346179}