Title: [179774] trunk/Source
- Revision
- 179774
- Author
- [email protected]
- Date
- 2015-02-06 19:06:58 -0800 (Fri, 06 Feb 2015)
Log Message
Have SQLiteStatement::database() return a reference
https://bugs.webkit.org/show_bug.cgi?id=141348
Reviewed by Andreas Kling.
Have SQLiteStatement::database() return a reference as it can never
return null.
Source/WebCore:
* loader/icon/IconDatabase.cpp:
(WebCore::readySQLiteStatement):
* platform/sql/SQLiteStatement.h:
(WebCore::SQLiteStatement::database):
Source/WebKit2:
* DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.cpp:
(WebKit::SQLiteIDBCursor::internalAdvanceOnce):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (179773 => 179774)
--- trunk/Source/WebCore/ChangeLog 2015-02-07 01:38:15 UTC (rev 179773)
+++ trunk/Source/WebCore/ChangeLog 2015-02-07 03:06:58 UTC (rev 179774)
@@ -1,3 +1,18 @@
+2015-02-06 Chris Dumez <[email protected]>
+
+ Have SQLiteStatement::database() return a reference
+ https://bugs.webkit.org/show_bug.cgi?id=141348
+
+ Reviewed by Andreas Kling.
+
+ Have SQLiteStatement::database() return a reference as it can never
+ return null.
+
+ * loader/icon/IconDatabase.cpp:
+ (WebCore::readySQLiteStatement):
+ * platform/sql/SQLiteStatement.h:
+ (WebCore::SQLiteStatement::database):
+
2015-02-06 Brent Fulgham <[email protected]>
Add youtube-nocookie URL to isYouTubeURL predicate
Modified: trunk/Source/WebCore/loader/icon/IconDatabase.cpp (179773 => 179774)
--- trunk/Source/WebCore/loader/icon/IconDatabase.cpp 2015-02-07 01:38:15 UTC (rev 179773)
+++ trunk/Source/WebCore/loader/icon/IconDatabase.cpp 2015-02-07 03:06:58 UTC (rev 179774)
@@ -1812,7 +1812,7 @@
// 2 - Lazy construction of the Statement in the first place, in case we've never made this query before
inline void readySQLiteStatement(std::unique_ptr<SQLiteStatement>& statement, SQLiteDatabase& db, const String& str)
{
- if (statement && (statement->database() != &db || statement->isExpired())) {
+ if (statement && (&statement->database() != &db || statement->isExpired())) {
if (statement->isExpired())
LOG(IconDatabase, "SQLiteStatement associated with %s is expired", str.ascii().data());
statement = nullptr;
Modified: trunk/Source/WebCore/platform/sql/SQLiteStatement.h (179773 => 179774)
--- trunk/Source/WebCore/platform/sql/SQLiteStatement.h 2015-02-07 01:38:15 UTC (rev 179773)
+++ trunk/Source/WebCore/platform/sql/SQLiteStatement.h 2015-02-07 03:06:58 UTC (rev 179774)
@@ -90,7 +90,7 @@
bool returnInt64Results(int col, Vector<int64_t>&);
bool returnDoubleResults(int col, Vector<double>&);
- SQLiteDatabase* database() { return &m_database; }
+ SQLiteDatabase& database() { return m_database; }
const String& query() const { return m_query; }
Modified: trunk/Source/WebKit2/ChangeLog (179773 => 179774)
--- trunk/Source/WebKit2/ChangeLog 2015-02-07 01:38:15 UTC (rev 179773)
+++ trunk/Source/WebKit2/ChangeLog 2015-02-07 03:06:58 UTC (rev 179774)
@@ -1,3 +1,16 @@
+2015-02-06 Chris Dumez <[email protected]>
+
+ Have SQLiteStatement::database() return a reference
+ https://bugs.webkit.org/show_bug.cgi?id=141348
+
+ Reviewed by Andreas Kling.
+
+ Have SQLiteStatement::database() return a reference as it can never
+ return null.
+
+ * DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.cpp:
+ (WebKit::SQLiteIDBCursor::internalAdvanceOnce):
+
2015-02-06 Alexey Proskuryakov <[email protected]>
Report network process crashes during layout tests
Modified: trunk/Source/WebKit2/DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.cpp (179773 => 179774)
--- trunk/Source/WebKit2/DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.cpp 2015-02-07 01:38:15 UTC (rev 179773)
+++ trunk/Source/WebKit2/DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.cpp 2015-02-07 03:06:58 UTC (rev 179774)
@@ -329,12 +329,12 @@
return AdvanceResult::Failure;
}
- SQLiteStatement objectStoreStatement(*m_statement->database(), "SELECT value FROM Records WHERE key = CAST(? AS TEXT) and objectStoreID = ?;");
+ SQLiteStatement objectStoreStatement(m_statement->database(), "SELECT value FROM Records WHERE key = CAST(? AS TEXT) and objectStoreID = ?;");
if (objectStoreStatement.prepare() != SQLResultOk
|| objectStoreStatement.bindBlob(1, m_currentValueBuffer.data(), m_currentValueBuffer.size()) != SQLResultOk
|| objectStoreStatement.bindInt64(2, m_objectStoreID) != SQLResultOk) {
- LOG_ERROR("Could not create index cursor statement into object store records (%i) '%s'", m_statement->database()->lastError(), m_statement->database()->lastErrorMsg());
+ LOG_ERROR("Could not create index cursor statement into object store records (%i) '%s'", m_statement->database().lastError(), m_statement->database().lastErrorMsg());
m_completed = true;
m_errored = true;
return AdvanceResult::Failure;
@@ -349,7 +349,7 @@
// Skip over it.
return AdvanceResult::ShouldAdvanceAgain;
} else {
- LOG_ERROR("Could not step index cursor statement into object store records (%i) '%s'", m_statement->database()->lastError(), m_statement->database()->lastErrorMsg());
+ LOG_ERROR("Could not step index cursor statement into object store records (%i) '%s'", m_statement->database().lastError(), m_statement->database().lastErrorMsg());
m_completed = true;
m_errored = true;
return AdvanceResult::Failure;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes