2009-05-29 David Levin <levin@chromium.org>
authorbfulgham@webkit.org <bfulgham@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 29 May 2009 21:38:07 +0000 (21:38 +0000)
committerbfulgham@webkit.org <bfulgham@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 29 May 2009 21:38:07 +0000 (21:38 +0000)
        Reviewed by Darin Adler.

        Bug 26074: SQLTransaction::executeSQL does an unnecessary call to String::copy.
        https://bugs.webkit.org/show_bug.cgi?id=26074

        The constructor for SQLStatement already does a copy for this string.

        * storage/SQLTransaction.cpp:
        (WebCore::SQLTransaction::executeSQL):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@44274 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/storage/SQLTransaction.cpp

index a384df2..d52f77b 100644 (file)
@@ -1,3 +1,15 @@
+2009-05-29  David Levin  <levin@chromium.org>
+
+        Reviewed by Darin Adler.
+
+        Bug 26074: SQLTransaction::executeSQL does an unnecessary call to String::copy.
+        https://bugs.webkit.org/show_bug.cgi?id=26074
+
+        The constructor for SQLStatement already does a copy for this string.
+
+        * storage/SQLTransaction.cpp:
+        (WebCore::SQLTransaction::executeSQL):
+
 2009-05-29  Darin Adler  <darin@apple.com>
 
         Fix build; the new Cairo code compiled on Windows only.
index ec48c15..3331e6e 100644 (file)
@@ -96,7 +96,7 @@ void SQLTransaction::executeSQL(const String& sqlStatement, const Vector<SQLValu
     if (!page || page->settings()->privateBrowsingEnabled())
         readOnlyMode = true;
     
-    RefPtr<SQLStatement> statement = SQLStatement::create(sqlStatement.copy(), arguments, callback, callbackError, readOnlyMode);
+    RefPtr<SQLStatement> statement = SQLStatement::create(sqlStatement, arguments, callback, callbackError, readOnlyMode);
 
     if (m_database->deleted())
         statement->setDatabaseDeletedError();