Modified: trunk/Source/WebCore/ChangeLog (185017 => 185018)
--- trunk/Source/WebCore/ChangeLog 2015-05-29 23:42:24 UTC (rev 185017)
+++ trunk/Source/WebCore/ChangeLog 2015-05-29 23:51:51 UTC (rev 185018)
@@ -1,3 +1,13 @@
+2015-05-29 Brady Eidson <beid...@apple.com>
+
+ Review feedback followup for r185003.
+ https://bugs.webkit.org/show_bug.cgi?id=145463
+
+ Reviewed by Darin Adler.
+
+ * platform/sql/SQLiteDatabase.cpp:
+ (WebCore::SQLiteDatabase::overrideUnauthorizedFunctions): `static const` one thing, c++-style cast another.
+
2015-05-29 Chris Dumez <cdu...@apple.com>
WebContent crash in WebCore::Page::sessionID() const + 0 (Page.cpp:1660)
Modified: trunk/Source/WebCore/platform/sql/SQLiteDatabase.cpp (185017 => 185018)
--- trunk/Source/WebCore/platform/sql/SQLiteDatabase.cpp 2015-05-29 23:42:24 UTC (rev 185017)
+++ trunk/Source/WebCore/platform/sql/SQLiteDatabase.cpp 2015-05-29 23:51:51 UTC (rev 185018)
@@ -134,7 +134,7 @@
void SQLiteDatabase::overrideUnauthorizedFunctions()
{
- std::pair<const char*, int> functionParameters[] = {
+ static const std::pair<const char*, int> functionParameters[] = {
{ "rtreenode", 2 },
{ "rtreedepth", 1 },
{ "eval", 1 },
@@ -145,7 +145,7 @@
};
for (auto& functionParameter : functionParameters)
- sqlite3_create_function(m_db, functionParameter.first, functionParameter.second, SQLITE_UTF8, (void*)functionParameter.first, unauthorizedSQLFunction, 0, 0);
+ sqlite3_create_function(m_db, functionParameter.first, functionParameter.second, SQLITE_UTF8, const_cast<char*>(functionParameter.first), unauthorizedSQLFunction, 0, 0);
}
void SQLiteDatabase::interrupt()