0
Commit Graph

236 Commits

Author SHA1 Message Date
6f68bd3907 [sql] Remove misleading AutoRecoverTable() parameter.
|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}
2016-02-04 19:30:45 +00:00
3c0ef4309a Move gn _run target generation into test(). (RELAND)
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}
2016-02-03 23:41:01 +00:00
002f222647 Revert of Move gn _run target generation into test(). (patchset id:1 of https://codereview.chromium.org/1653003006/ )
Reason for revert:
Broke angle_unittests_run, which doesn't follow the template:

https://build.chromium.org/p/chromium.gpu.fyi/builders/GPU%20Linux%20Builder/builds/53646/steps/compile/logs/stdio

Original issue's description:
> Move gn _run target generation into test().
>
> TBR=brettw@chromium.org
> BUG=
> CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel
>
> Committed: https://crrev.com/6b1b03783b81ea27bb521c02aa84b74f06d6f71a
> Cr-Commit-Position: refs/heads/master@{#373232}

TBR=phosek@chromium.org,brettw@chromium.org,jbudorick@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=

Review URL: https://codereview.chromium.org/1664653003

Cr-Commit-Position: refs/heads/master@{#373257}
2016-02-03 16:59:37 +00:00
6b1b03783b Move gn _run target generation into test().
TBR=brettw@chromium.org
BUG=
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel

Review URL: https://codereview.chromium.org/1653003006

Cr-Commit-Position: refs/heads/master@{#373232}
2016-02-03 14:36:58 +00:00
874ea1bd6e [sql] Prevent recovery against a closed database.
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}
2016-02-02 05:16:20 +00:00
7ce37c1ec3 Add flag to disable mmap in all sql connection in work build
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}
2016-01-28 22:09:52 +00:00
115ceedf72 allocator cleanup: remove dependencies on allocator from all targets
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}
2016-01-28 21:11:58 +00:00
sky
d837812ff8 Make use of CreateInterfacePtrAndBind() where appropriate
BUG=579645
TEST=none

Review URL: https://codereview.chromium.org/1635603002

Cr-Commit-Position: refs/heads/master@{#371598}
2016-01-26 21:14:52 +00:00
16fb38a8b8 Change mojo enums to be scoped enums in the generated C++ bindings.
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}
2016-01-21 05:31:02 +00:00
3be5b1ecdf [tracing] Add separate dump provider for sql connection
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}
2016-01-13 14:23:13 +00:00
ben
273c1e3024 Move mojo/application/public -> mojo/shell/public
TBR=sky@chromium.org
http://crbug.com/575308

Review URL: https://codereview.chromium.org/1565343003

Cr-Commit-Position: refs/heads/master@{#368776}
2016-01-12 02:44:59 +00:00
e486004502 Global conversion of Pass()→std::move() on OS==linux
❆(੭ु ◜◡‾)੭ु⁾☃❆

BUG=557422
R=avi@chromium.org
TBR=jam@chromium.org

Review URL: https://codereview.chromium.org/1550693002

Cr-Commit-Position: refs/heads/master@{#366956}
2015-12-28 02:26:02 +00:00
avi
51ba3e6902 Clean up header files.
BUG=138542
TBR=ben@chromium.org
NOPRESUBMIT=true

Review URL: https://codereview.chromium.org/1544283002

Cr-Commit-Position: refs/heads/master@{#366903}
2015-12-26 17:32:10 +00:00
avi
0b519209e6 Switch to standard integer types in xxx/.
BUG=138542
TBR=shess@chromium.org

Review URL: https://codereview.chromium.org/1533283002

Cr-Commit-Position: refs/heads/master@{#366346}
2015-12-21 07:26:18 +00:00
9bf2c67457 [sql] Consider fresh databases suitable for memory-mapped I/O.
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}
2015-12-18 01:19:51 +00:00
53adf16ef2 [sql] Test mmap operation based on SQLite capabilities.
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}
2015-12-17 22:08:06 +00:00
324f212c42 Add more components to "gn check".
network_hints
  network_time
  offline_pages
  omnibox
  onc
  open_from_clipboard
  os_crypt
  ownership
  packed_ct_ev_whitelist
  page_load_metrics
  pairing
  password_manager

TBR=dpranke

Review URL: https://codereview.chromium.org/1482653002

Cr-Commit-Position: refs/heads/master@{#362017}
2015-11-27 17:06:08 +00:00
ben
a5404b52ab Convert ConnectToApplication to take a params class
R=sky@chromium.org
BUG=none

Review URL: https://codereview.chromium.org/1455833005

Cr-Commit-Position: refs/heads/master@{#360954}
2015-11-20 23:50:00 +00:00
d7a71c8899 Run gn --format over all .gn files
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}
2015-11-20 19:54:12 +00:00
0917ec4328 Use std::default_delete as the default deleter for scoped_ptr.
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}
2015-11-19 07:01:23 +00:00
d90aeea876 [sql] Validate database files before enabling memory-mapping.
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.

[Relands https://codereview.chromium.org/1426743006 which was reverted at
 https://codereview.chromium.org/1432953002 .  CL is identical, fix to
 sql::Connection was landed at https://codereview.chromium.org/1426743006 .]

BUG=537742
TBR=rmcilroy@chromium.org, isherman+reviewer@chromium.org

Review URL: https://codereview.chromium.org/1442753004

Cr-Commit-Position: refs/heads/master@{#359478}
2015-11-13 02:25:28 +00:00
85dce08600 Move third_party/mojo/src/mojo/public to mojo/public
BUG=None
NOPRESUBMIT=true

Review URL: https://codereview.chromium.org/1410053006

Cr-Commit-Position: refs/heads/master@{#359461}
2015-11-13 01:34:47 +00:00
f7e988ff06 [sql] Differentiate compile errors from regular errors.
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}
2015-11-13 00:42:10 +00:00
f2bfe56ff5 Eliminate third_party/mojo/src from all targets' include paths
Eliding presubmit here because the missing DEPS entries are going to be addressed here: https://codereview.chromium.org/1410053006

BUG=554556
R=jam@chromium.org
NOPRESUBMIT=true

Review URL: https://codereview.chromium.org/1435063002 .

Cr-Commit-Position: refs/heads/master@{#359174}
2015-11-11 22:26:07 +00:00
1736cd0fb2 Revert "[sql] Validate database files before enabling memory-mapping."
This reverts commit de8784cf20.

Reason for Revert:
Implicated in test failures:
ChromeMainTest.ReuseBrowserInstanceWhenOpeningFile
ChromeMainTest.SecondLaunch
ChromeMainTest.SecondLaunchFromIncognitoWithNormalUrl
DiagnosticsControllerTest.RecoverFromNssCertDbFailure
DiagnosticsControllerTest.RecoverFromNssKeyDbFailure

First failing bot:
https://build.chromium.org/p/chromium.chromiumos/builders/Linux%20ChromiumOS%20Tests%20%28dbg%29%281%29/builds/8908

Original Issue:
https://codereview.chromium.org/1426743006

TBR=shess@chromium.org, isherman@chromium.org, rmcilroy@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=537742

Review URL: https://codereview.chromium.org/1432953002

Cr-Commit-Position: refs/heads/master@{#358709}
2015-11-10 00:14:44 +00:00
90244e155a [sql] Fix typo in error message.
CL https://codereview.chromium.org/1419573008 fixed a typo, but made a
typo.

BUG=none
TBR=michaeln@chromium.org

Review URL: https://codereview.chromium.org/1428523007

Cr-Commit-Position: refs/heads/master@{#358673}
2015-11-09 22:09:19 +00:00
de8784cf20 [sql] Validate database files before enabling memory-mapping.
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}
2015-11-09 22:06:37 +00:00
5dac334f21 [sql] Increase database chunk size for large databases.
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}
2015-11-05 20:48:28 +00:00
2f3a814be0 [sql] Disable memory-mapping under sql::Recovery.
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}
2015-11-05 18:11:47 +00:00
186d6bfe41 [tracing] Add names to memory-infra dumpers for debugging
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}
2015-10-30 13:22:34 +00:00
dea7ae9bd8 [sql] QuotaDatabase schema upgrade doesn't use transactions right.
BUG=548371

Review URL: https://codereview.chromium.org/1419573008

Cr-Commit-Position: refs/heads/master@{#356675}
2015-10-28 22:44:06 +00:00
erg
127dbee2bb mandoline: Start adding trace events for mandoline stuff.
BUG=534895

Review URL: https://codereview.chromium.org/1421483003

Cr-Commit-Position: refs/heads/master@{#355915}
2015-10-23 23:05:27 +00:00
c8cd2a1619 [sql] Track uploads of diagnostic data to prevent duplication.
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}
2015-10-22 20:31:33 +00:00
9f8022f2aa [tracing] Add sqlite memory statistics to tracing.
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}
2015-10-12 17:49:46 +00:00
7dbd4dee47 [sql] Use memory-mapped I/O for sql::Connection.
sql::Connection::Open*() uses PRAGMA mmap_size to enable SQLite's
memory-mapped I/O.  Additionally instrument to flush dirty pages from
the page cache after writes.

BUG=489784,533682,537681,537636

[Relands https://crrev.com/9a1948a4d6d4 (),
reverted at https://crrev.com/55c3216b15ce (),
relanded at https://crrev.com/5c2f4e50d96d (),
reverted at https://crrev.com/745e18c52384 ().
May the waterfall have mercy on my CL.]

Review URL: https://codereview.chromium.org/1382283003

Cr-Commit-Position: refs/heads/master@{#352631}
2015-10-06 17:39:52 +00:00
21383131e6 Isolate sql_unittests_apk.
BUG=525873

Review URL: https://codereview.chromium.org/1377793004

Cr-Commit-Position: refs/heads/master@{#352237}
2015-10-03 04:54:20 +00:00
745e18c523 Revert of [sql] Use memory-mapped I/O for sql::Connection. (patchset id:40001 of https://codereview.chromium.org/1368533003/ )
Reason for revert:
data race reported by TSan on sql/connection.cc

BUG=537681

Original issue's description:
> [sql] Use memory-mapped I/O for sql::Connection.
>
> sql::Connection::Open*() uses PRAGMA mmap_size to enable SQLite's
> memory-mapped I/O.  Additionally instrument to flush dirty pages from
> the page cache after writes.
>
> [Relands https://crrev.com/9a1948a4d6d4,
> reverted at https://crrev.com/55c3216b15ce ]
>
> BUG=489784, 533682
>
> Committed: https://crrev.com/5c2f4e50d96d8b2ae0ae4a5c7d319e6be3b33bca
> Cr-Commit-Position: refs/heads/master@{#351344}

TBR=rmcilroy@chromium.org,pavely@chromium.org,shess@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=489784, 533682

Review URL: https://codereview.chromium.org/1375583003

Cr-Commit-Position: refs/heads/master@{#351596}
2015-09-30 18:05:20 +00:00
5c2f4e50d9 [sql] Use memory-mapped I/O for sql::Connection.
sql::Connection::Open*() uses PRAGMA mmap_size to enable SQLite's
memory-mapped I/O.  Additionally instrument to flush dirty pages from
the page cache after writes.

[Relands https://crrev.com/9a1948a4d6d4,
reverted at https://crrev.com/55c3216b15ce ]

BUG=489784, 533682

Review URL: https://codereview.chromium.org/1368533003

Cr-Commit-Position: refs/heads/master@{#351344}
2015-09-29 17:22:02 +00:00
55c3216b15 Revert of [sql] Use memory-mapped I/O for sql::Connection. (patchset id:140001 of https://codereview.chromium.org/1349863003/ )
Reason for revert:
mmap_enabled_ isn't initialized, causing MSAN failures:

https://storage.googleapis.com/chromium-layout-test-archives/WebKit_Linux_MSAN/5882/layout-test-results/virtual/sharedarraybuffer/fast/workers/constructor-proto-crash-log.txt

STDERR: ==3138==WARNING: MemorySanitizer: use-of-uninitialized-value
STDERR:      0x7fc8068d3a65 in ReleaseCacheMemoryIfNeeded sql/connection.cc:513:7
STDERR:      0x7fc8068d3a65 in sql::Connection::ExecuteAndReturnErrorCode(char const*) sql/connection.cc:943:0
STDERR:      0x7fc8068ca454 in sql::Connection::OpenInternal(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, sql::Connection::Retry) sql/connection.cc:1275:9
STDERR:      0x7fc8068c845f in sql::Connection::Open(base::FilePath const&) sql/connection.cc:367:10
STDERR:      0x7fc806b1b868 in storage::QuotaDatabase::LazyOpen(bool) storage/browser/quota/quota_database.cc:488:14

Original issue's description:
> [sql] Use memory-mapped I/O for sql::Connection.
>
> sql::Connection::Open*() uses PRAGMA mmap_size to enable SQLite's
> memory-mapped I/O.  Additionally instrument to flush dirty pages from
> the page cache after writes.
>
> BUG=489784,533682
>
> Committed: https://crrev.com/9a1948a4d6d445d5c8e209bdcd1cd050af72060b
> Cr-Commit-Position: refs/heads/master@{#350362}

R=shess@chromium.org
TBR=pavely@chromium.org, pvalenzuela@chromium.org, rmcilroy@chromium.org, shess@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=489784,533682

Review URL: https://codereview.chromium.org/1365783002 .

Cr-Commit-Position: refs/heads/master@{#350386}
2015-09-23 23:28:49 +00:00
9a1948a4d6 [sql] Use memory-mapped I/O for sql::Connection.
sql::Connection::Open*() uses PRAGMA mmap_size to enable SQLite's
memory-mapped I/O.  Additionally instrument to flush dirty pages from
the page cache after writes.

BUG=489784,533682

Review URL: https://codereview.chromium.org/1349863003

Cr-Commit-Position: refs/heads/master@{#350362}
2015-09-23 20:33:56 +00:00
702467624c [sql] sqlite3_initialize() before additional entry point.
sqlite3_vfs_find() added an additional entry point in Delete(), which is
static.

BUG=84094
TBR=erg@chromium.org

Review URL: https://codereview.chromium.org/1351653002

Cr-Commit-Position: refs/heads/master@{#349179}
2015-09-16 19:05:29 +00:00
63a4d153f1 Fix sbox_validation_tests & Make isolate_driver.py include the executable itself
This is a redo of https://codereview.chromium.org/1245873002 c6649f2e01
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}
2015-09-09 12:27:45 +00:00
7c8964f3cf Revert of Fix sbox_validation_tests & Make isolate_driver.py include the executable itself (patchset id:90001 of https://codereview.chromium.org/1245873002/ )
Reason for revert:
This CL seems to break compile http://build.chromium.org/p/chromium.chrome/builders/Google%20Chrome%20Linux%20x64/builds/3900/.

If the revert doesn't fix it, I will re-land this CL.

Original issue's description:
> Fix sbox_validation_tests & Make isolate_driver.py include the executable itself
>
> 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
>
> Committed: https://crrev.com/c6649f2e014a24a9093140a06fcadcaf2a06513c
> Cr-Commit-Position: refs/heads/master@{#347027}

TBR=jam@chromium.org,maruel@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=98637

Review URL: https://codereview.chromium.org/1329783003

Cr-Commit-Position: refs/heads/master@{#347071}
2015-09-03 00:37:49 +00:00
c6649f2e01 Fix sbox_validation_tests & Make isolate_driver.py include the executable itself
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}
2015-09-02 21:21:27 +00:00
6ce9d1f07c [sql] Drop sqlite3_* proxy hacks.
Now that sqlite is a shlib under component build, the hacks to proxy
functions are not necessary.

BUG=489444
TBR=michaeln@chromium.org

Review URL: https://codereview.chromium.org/1303423009

Cr-Commit-Position: refs/heads/master@{#346994}
2015-09-02 19:38:24 +00:00
9d8aca4a2a Revert of [sqlite] Respect the gyp and gn component switch. (patchset id:100001 of https://codereview.chromium.org/1306863006/ )
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}
2015-09-01 10:21:13 +00:00
f71db5c366 [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

Review URL: https://codereview.chromium.org/1306863006

Cr-Commit-Position: refs/heads/master@{#346536}
2015-09-01 00:31:26 +00:00
e4f267ed41 Revert of [sqlite] Respect the gyp and gn component switch. (patchset id:20001 of https://codereview.chromium.org/1325513002/ )
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}
2015-08-28 19:54:36 +00:00
02ce712af5 [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

Review URL: https://codereview.chromium.org/1325513002

Cr-Commit-Position: refs/heads/master@{#346212}
2015-08-28 19:39:56 +00:00
b5feb9e34a Revert of [sqlite] Respect the gyp and gn component switch. (patchset id:1 of https://codereview.chromium.org/1322463002/ )
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}
2015-08-28 17:48:39 +00:00