Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Unified Diff: sql/statement.cc

Issue 9418021: Clear statement before closing db in cookie code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sql/statement.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sql/statement.cc
diff --git a/sql/statement.cc b/sql/statement.cc
index a5daae49a6029f97b0950d4773a840cd5ac222cc..decdb686ecded66bfe7e6f833a3f3c31bd2699ca 100644
--- a/sql/statement.cc
+++ b/sql/statement.cc
@@ -35,6 +35,11 @@ void Statement::Assign(scoped_refptr<Connection::StatementRef> ref) {
ref_ = ref;
}
+void Statement::Clear() {
+ Assign(new Connection::StatementRef);
+ succeeded_ = false;
+}
+
bool Statement::CheckValid() const {
if (!is_valid())
DLOG(FATAL) << "Cannot call mutating statements on an invalid statement.";
« no previous file with comments | « sql/statement.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698