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

Unified Diff: sql/connection.h

Issue 11886065: Fixing null pointer dereference. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 11 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 | « no previous file | sql/statement.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sql/connection.h
diff --git a/sql/connection.h b/sql/connection.h
index b9f45ec480c8af44e03309b060abd07360582a1c..2722ffdc7f9d51557090b2300d1514135b9737bd 100644
--- a/sql/connection.h
+++ b/sql/connection.h
@@ -370,8 +370,9 @@ class SQL_EXPORT Connection {
// When true, the statement can be used.
bool is_valid() const { return !!stmt_; }
- // If we've not been linked to a connection, this will be NULL. Guaranteed
- // non-NULL when is_valid().
+ // If we've not been linked to a connection, this will be NULL.
+ // TODO(shess): connection_ can be NULL in case of GetUntrackedStatement(),
+ // which prevents Statement::OnError() from forwarding errors.
Connection* connection() const { return connection_; }
// Returns the sqlite statement if any. If the statement is not active,
« no previous file with comments | « no previous file | sql/statement.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698