summaryrefslogtreecommitdiffstats
path: root/sql/statement.cc
diff options
context:
space:
mode:
authorshess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-18 20:44:26 +0000
committershess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-18 20:44:26 +0000
commit8262829e7be657d706c69795df33649600922029 (patch)
treef0ec67c619470a3fd5a0f75a6c3dd22ad153b4d1 /sql/statement.cc
parent5a53501df8894373cc60d6eb3d46aad4e5139ff8 (diff)
downloadchromium_src-8262829e7be657d706c69795df33649600922029.zip
chromium_src-8262829e7be657d706c69795df33649600922029.tar.gz
chromium_src-8262829e7be657d706c69795df33649600922029.tar.bz2
Annotate calls to SQLite functions - they have to be executed on a thread allowing IO access.
Expand scope of ScopedAllowIO in the only place where SQLite functions are used on UI thread. Patch from Pavel Ivanov <paivanof@gmail.com> BUG=75232,52909 TEST=no test fails with message "Function marked as IO-only was called from a thread that disallows IO!" Review URL: https://chromiumcodereview.appspot.com/10540155 Patch from Pavel Ivanov <paivanof@gmail.com>. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@147309 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sql/statement.cc')
-rw-r--r--sql/statement.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/sql/statement.cc b/sql/statement.cc
index 3616dcc..84dfd2e 100644
--- a/sql/statement.cc
+++ b/sql/statement.cc
@@ -48,6 +48,7 @@ bool Statement::CheckValid() const {
}
bool Statement::Run() {
+ ref_->AssertIOAllowed();
if (!CheckValid())
return false;
@@ -55,6 +56,7 @@ bool Statement::Run() {
}
bool Statement::Step() {
+ ref_->AssertIOAllowed();
if (!CheckValid())
return false;
@@ -62,6 +64,7 @@ bool Statement::Step() {
}
void Statement::Reset(bool clear_bound_vars) {
+ ref_->AssertIOAllowed();
if (is_valid()) {
// We don't call CheckError() here because sqlite3_reset() returns
// the last error that Step() caused thereby generating a second