Changeset 143090 in webkit


Ignore:
Timestamp:
Feb 15, 2013 7:03:50 PM (11 years ago)
Author:
mark.lam@apple.com
Message:

Split SQLStatement work between the frontend and backend.
https://bugs.webkit.org/show_bug.cgi?id=104751.

Reviewed by Geoffrey Garen.

This is part of the webdatabase refactoring for webkit2.

  1. Copied SQLTransaction to SQLTransactionBackend, and then reduce the 2 to only handle frontend and backend work respectively.
  1. Changed how statements are created.
  • SQLTransaction::executeSQL() first creates a SQLStatement frontend which encapsulates the 2 script callbacks. It then passes the SQLStatement to the backend database to create the SQLStatementBackend.
  • The SQLStatementBackend manages all sqlite work.
  1. Remove the Database::reportExecuteStatementResult() wrapper because it is only needed in the backend now.
  1. Added new files to the build / project files.
  1. Updated / added comments about how the SQLStatement life-cycle works.

No new tests.

  • CMakeLists.txt:
  • GNUmakefile.list.am:
  • Modules/webdatabase/Database.cpp:
  • Modules/webdatabase/Database.h:

(Database):
(WebCore::Database::reportCommitTransactionResult):

  • Modules/webdatabase/DatabaseBackend.h:

(DatabaseBackend):

  • Modules/webdatabase/SQLStatement.cpp:

(WebCore::SQLStatement::create):
(WebCore::SQLStatement::SQLStatement):
(WebCore::SQLStatement::setBackend):
(WebCore::SQLStatement::hasCallback):
(WebCore::SQLStatement::hasErrorCallback):
(WebCore::SQLStatement::performCallback):

  • Modules/webdatabase/SQLStatement.h:

(SQLStatement):

  • Modules/webdatabase/SQLStatementBackend.cpp: Copied from Source/WebCore/Modules/webdatabase/SQLStatement.cpp.

(WebCore::SQLStatementBackend::create):
(WebCore::SQLStatementBackend::SQLStatementBackend):
(WebCore::SQLStatementBackend::frontend):
(WebCore::SQLStatementBackend::sqlError):
(WebCore::SQLStatementBackend::sqlResultSet):
(WebCore::SQLStatementBackend::execute):
(WebCore::SQLStatementBackend::setDatabaseDeletedError):
(WebCore::SQLStatementBackend::setVersionMismatchedError):
(WebCore::SQLStatementBackend::setFailureDueToQuota):
(WebCore::SQLStatementBackend::clearFailureDueToQuota):
(WebCore::SQLStatementBackend::lastExecutionFailedDueToQuota):

  • Modules/webdatabase/SQLStatementBackend.h: Copied from Source/WebCore/Modules/webdatabase/SQLStatement.h.

(SQLStatementBackend):
(WebCore::SQLStatementBackend::hasStatementCallback):
(WebCore::SQLStatementBackend::hasStatementErrorCallback):

  • Modules/webdatabase/SQLTransaction.cpp:

(WebCore::SQLTransaction::deliverStatementCallback):
(WebCore::SQLTransaction::deliverQuotaIncreaseCallback):
(WebCore::SQLTransaction::executeSQL):

  • Modules/webdatabase/SQLTransactionBackend.cpp:

(WebCore::SQLTransactionBackend::doCleanup):
(WebCore::SQLTransactionBackend::currentStatement):
(WebCore::SQLTransactionBackend::enqueueStatementBackend):
(WebCore::SQLTransactionBackend::executeSQL):
(WebCore::SQLTransactionBackend::runStatements):
(WebCore::SQLTransactionBackend::getNextStatement):
(WebCore::SQLTransactionBackend::runCurrentStatementAndGetNextState):
(WebCore::SQLTransactionBackend::nextStateForCurrentStatementError):

  • Modules/webdatabase/SQLTransactionBackend.h:

(SQLTransactionBackend):

  • Target.pri:
  • WebCore.gypi:
  • WebCore.vcproj/WebCore.vcproj:
  • WebCore.vcxproj/WebCore.vcxproj:
  • WebCore.vcxproj/WebCore.vcxproj.filters:
  • WebCore.xcodeproj/project.pbxproj:
Location:
trunk/Source/WebCore
Files:
17 edited
2 copied

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/CMakeLists.txt

    r142957 r143090  
    958958    Modules/webdatabase/SQLResultSetRowList.cpp
    959959    Modules/webdatabase/SQLStatement.cpp
     960    Modules/webdatabase/SQLStatementBackend.cpp
    960961    Modules/webdatabase/SQLStatementSync.cpp
    961962    Modules/webdatabase/SQLTransaction.cpp
  • trunk/Source/WebCore/ChangeLog

    r143089 r143090  
     12013-02-15  Mark Lam  <mark.lam@apple.com>
     2
     3        Split SQLStatement work between the frontend and backend.
     4        https://bugs.webkit.org/show_bug.cgi?id=104751.
     5
     6        Reviewed by Geoffrey Garen.
     7
     8        This is part of the webdatabase refactoring for webkit2.
     9
     10        1. Copied SQLTransaction to SQLTransactionBackend, and then reduce the
     11           2 to only handle frontend and backend work respectively.
     12
     13        2. Changed how statements are created.
     14
     15           - SQLTransaction::executeSQL() first creates a SQLStatement frontend
     16             which encapsulates the 2 script callbacks. It then passes the
     17             SQLStatement to the backend database to create the
     18             SQLStatementBackend.
     19           - The SQLStatementBackend manages all sqlite work.
     20
     21        3. Remove the Database::reportExecuteStatementResult() wrapper because
     22           it is only needed in the backend now.
     23
     24        4. Added new files to the build / project files.
     25
     26        5. Updated / added comments about how the SQLStatement life-cycle works.
     27
     28        No new tests.
     29
     30        * CMakeLists.txt:
     31        * GNUmakefile.list.am:
     32        * Modules/webdatabase/Database.cpp:
     33        * Modules/webdatabase/Database.h:
     34        (Database):
     35        (WebCore::Database::reportCommitTransactionResult):
     36        * Modules/webdatabase/DatabaseBackend.h:
     37        (DatabaseBackend):
     38        * Modules/webdatabase/SQLStatement.cpp:
     39        (WebCore::SQLStatement::create):
     40        (WebCore::SQLStatement::SQLStatement):
     41        (WebCore::SQLStatement::setBackend):
     42        (WebCore::SQLStatement::hasCallback):
     43        (WebCore::SQLStatement::hasErrorCallback):
     44        (WebCore::SQLStatement::performCallback):
     45        * Modules/webdatabase/SQLStatement.h:
     46        (SQLStatement):
     47        * Modules/webdatabase/SQLStatementBackend.cpp: Copied from Source/WebCore/Modules/webdatabase/SQLStatement.cpp.
     48        (WebCore::SQLStatementBackend::create):
     49        (WebCore::SQLStatementBackend::SQLStatementBackend):
     50        (WebCore::SQLStatementBackend::frontend):
     51        (WebCore::SQLStatementBackend::sqlError):
     52        (WebCore::SQLStatementBackend::sqlResultSet):
     53        (WebCore::SQLStatementBackend::execute):
     54        (WebCore::SQLStatementBackend::setDatabaseDeletedError):
     55        (WebCore::SQLStatementBackend::setVersionMismatchedError):
     56        (WebCore::SQLStatementBackend::setFailureDueToQuota):
     57        (WebCore::SQLStatementBackend::clearFailureDueToQuota):
     58        (WebCore::SQLStatementBackend::lastExecutionFailedDueToQuota):
     59        * Modules/webdatabase/SQLStatementBackend.h: Copied from Source/WebCore/Modules/webdatabase/SQLStatement.h.
     60        (SQLStatementBackend):
     61        (WebCore::SQLStatementBackend::hasStatementCallback):
     62        (WebCore::SQLStatementBackend::hasStatementErrorCallback):
     63        * Modules/webdatabase/SQLTransaction.cpp:
     64        (WebCore::SQLTransaction::deliverStatementCallback):
     65        (WebCore::SQLTransaction::deliverQuotaIncreaseCallback):
     66        (WebCore::SQLTransaction::executeSQL):
     67        * Modules/webdatabase/SQLTransactionBackend.cpp:
     68        (WebCore::SQLTransactionBackend::doCleanup):
     69        (WebCore::SQLTransactionBackend::currentStatement):
     70        (WebCore::SQLTransactionBackend::enqueueStatementBackend):
     71        (WebCore::SQLTransactionBackend::executeSQL):
     72        (WebCore::SQLTransactionBackend::runStatements):
     73        (WebCore::SQLTransactionBackend::getNextStatement):
     74        (WebCore::SQLTransactionBackend::runCurrentStatementAndGetNextState):
     75        (WebCore::SQLTransactionBackend::nextStateForCurrentStatementError):
     76        * Modules/webdatabase/SQLTransactionBackend.h:
     77        (SQLTransactionBackend):
     78        * Target.pri:
     79        * WebCore.gypi:
     80        * WebCore.vcproj/WebCore.vcproj:
     81        * WebCore.vcxproj/WebCore.vcxproj:
     82        * WebCore.vcxproj/WebCore.vcxproj.filters:
     83        * WebCore.xcodeproj/project.pbxproj:
     84
    1852013-02-15  Elliott Sprehn  <esprehn@chromium.org>
    286
  • trunk/Source/WebCore/GNUmakefile.list.am

    r142957 r143090  
    21532153        Source/WebCore/Modules/webdatabase/SQLStatementCallback.h \
    21542154        Source/WebCore/Modules/webdatabase/SQLStatement.cpp \
     2155        Source/WebCore/Modules/webdatabase/SQLStatement.h \
     2156        Source/WebCore/Modules/webdatabase/SQLStatementBackend.cpp \
     2157        Source/WebCore/Modules/webdatabase/SQLStatementBackend.h \
    21552158        Source/WebCore/Modules/webdatabase/SQLStatementErrorCallback.h \
    2156         Source/WebCore/Modules/webdatabase/SQLStatement.h \
    21572159        Source/WebCore/Modules/webdatabase/SQLStatementSync.cpp \
    21582160        Source/WebCore/Modules/webdatabase/SQLStatementSync.h \
  • trunk/Source/WebCore/Modules/webdatabase/Database.cpp

    r142921 r143090  
    316316}
    317317
    318 void Database::reportExecuteStatementResult(int errorSite, int webSqlErrorCode, int sqliteErrorCode)
    319 {
    320     backend()->reportExecuteStatementResult(errorSite, webSqlErrorCode, sqliteErrorCode);
    321 }
    322318#endif
    323319
  • trunk/Source/WebCore/Modules/webdatabase/Database.h

    r142921 r143090  
    9494    void reportStartTransactionResult(int errorSite, int webSqlErrorCode, int sqliteErrorCode);
    9595    void reportCommitTransactionResult(int errorSite, int webSqlErrorCode, int sqliteErrorCode);
    96     void reportExecuteStatementResult(int errorSite, int webSqlErrorCode, int sqliteErrorCode);
    9796#else
    9897    void reportStartTransactionResult(int, int, int) { }
    9998    void reportCommitTransactionResult(int, int, int) { }
    100     void reportExecuteStatementResult(int, int, int) { }
    10199#endif
    102100
  • trunk/Source/WebCore/Modules/webdatabase/DatabaseBackend.h

    r142921 r143090  
    9494protected:
    9595    friend class ChangeVersionWrapper;
    96     friend class SQLStatement;
     96    friend class SQLStatementBackend;
    9797    friend class SQLStatementSync;
    9898    friend class SQLTransactionBackend;
  • trunk/Source/WebCore/Modules/webdatabase/SQLStatement.cpp

    r129886 r143090  
    11/*
    2  * Copyright (C) 2007 Apple Inc. All rights reserved.
     2 * Copyright (C) 2007, 2013 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    3131#if ENABLE(SQL_DATABASE)
    3232
     33#include "AbstractDatabaseServer.h"
    3334#include "Database.h"
     35#include "DatabaseManager.h"
    3436#include "Logging.h"
    3537#include "SQLError.h"
    36 #include "SQLiteDatabase.h"
    37 #include "SQLiteStatement.h"
     38#include "SQLStatementBackend.h"
    3839#include "SQLStatementCallback.h"
    3940#include "SQLStatementErrorCallback.h"
    4041#include "SQLTransaction.h"
    4142#include "SQLValue.h"
     43#include "SQLiteDatabase.h"
     44#include "SQLiteStatement.h"
    4245#include <wtf/text/CString.h>
    4346
    4447namespace WebCore {
    4548
    46 PassRefPtr<SQLStatement> SQLStatement::create(Database* database, const String& statement, const Vector<SQLValue>& arguments, PassRefPtr<SQLStatementCallback> callback, PassRefPtr<SQLStatementErrorCallback> errorCallback, int permissions)
     49PassOwnPtr<SQLStatement> SQLStatement::create(Database* database,
     50    PassRefPtr<SQLStatementCallback> callback, PassRefPtr<SQLStatementErrorCallback> errorCallback)
    4751{
    48     return adoptRef(new SQLStatement(database, statement, arguments, callback, errorCallback, permissions));
     52    return adoptPtr(new SQLStatement(database, callback, errorCallback));
    4953}
    5054
    51 SQLStatement::SQLStatement(Database* database, const String& statement, const Vector<SQLValue>& arguments, PassRefPtr<SQLStatementCallback> callback, PassRefPtr<SQLStatementErrorCallback> errorCallback, int permissions)
    52     : m_statement(statement.isolatedCopy())
    53     , m_arguments(arguments)
    54     , m_statementCallbackWrapper(callback, database->scriptExecutionContext())
     55SQLStatement::SQLStatement(Database* database, PassRefPtr<SQLStatementCallback> callback,
     56    PassRefPtr<SQLStatementErrorCallback> errorCallback)
     57    : m_statementCallbackWrapper(callback, database->scriptExecutionContext())
    5558    , m_statementErrorCallbackWrapper(errorCallback, database->scriptExecutionContext())
    56     , m_permissions(permissions)
    5759{
    5860}
    5961
    60 bool SQLStatement::execute(Database* db)
     62void SQLStatement::setBackend(SQLStatementBackend* backend)
    6163{
    62     ASSERT(!m_resultSet);
    63 
    64     // If we're re-running this statement after a quota violation, we need to clear that error now
    65     clearFailureDueToQuota();
    66 
    67     // This transaction might have been marked bad while it was being set up on the main thread,
    68     // so if there is still an error, return false.
    69     if (m_error)
    70         return false;
    71 
    72     db->setAuthorizerPermissions(m_permissions);
    73 
    74     SQLiteDatabase* database = &db->sqliteDatabase();
    75 
    76     SQLiteStatement statement(*database, m_statement);
    77     int result = statement.prepare();
    78 
    79     if (result != SQLResultOk) {
    80         LOG(StorageAPI, "Unable to verify correctness of statement %s - error %i (%s)", m_statement.ascii().data(), result, database->lastErrorMsg());
    81         if (result == SQLResultInterrupt)
    82             m_error = SQLError::create(SQLError::DATABASE_ERR, "could not prepare statement", result, "interrupted");
    83         else
    84             m_error = SQLError::create(SQLError::SYNTAX_ERR, "could not prepare statement", result, database->lastErrorMsg());
    85         db->reportExecuteStatementResult(1, m_error->code(), result);
    86         return false;
    87     }
    88 
    89     // FIXME:  If the statement uses the ?### syntax supported by sqlite, the bind parameter count is very likely off from the number of question marks.
    90     // If this is the case, they might be trying to do something fishy or malicious
    91     if (statement.bindParameterCount() != m_arguments.size()) {
    92         LOG(StorageAPI, "Bind parameter count doesn't match number of question marks");
    93         m_error = SQLError::create(db->isInterrupted() ? SQLError::DATABASE_ERR : SQLError::SYNTAX_ERR, "number of '?'s in statement string does not match argument count");
    94         db->reportExecuteStatementResult(2, m_error->code(), 0);
    95         return false;
    96     }
    97 
    98     for (unsigned i = 0; i < m_arguments.size(); ++i) {
    99         result = statement.bindValue(i + 1, m_arguments[i]);
    100         if (result == SQLResultFull) {
    101             setFailureDueToQuota(db);
    102             return false;
    103         }
    104 
    105         if (result != SQLResultOk) {
    106             LOG(StorageAPI, "Failed to bind value index %i to statement for query '%s'", i + 1, m_statement.ascii().data());
    107             db->reportExecuteStatementResult(3, SQLError::DATABASE_ERR, result);
    108             m_error = SQLError::create(SQLError::DATABASE_ERR, "could not bind value", result, database->lastErrorMsg());
    109             return false;
    110         }
    111     }
    112 
    113     RefPtr<SQLResultSet> resultSet = SQLResultSet::create();
    114 
    115     // Step so we can fetch the column names.
    116     result = statement.step();
    117     if (result == SQLResultRow) {
    118         int columnCount = statement.columnCount();
    119         SQLResultSetRowList* rows = resultSet->rows();
    120 
    121         for (int i = 0; i < columnCount; i++)
    122             rows->addColumn(statement.getColumnName(i));
    123 
    124         do {
    125             for (int i = 0; i < columnCount; i++)
    126                 rows->addResult(statement.getColumnValue(i));
    127 
    128             result = statement.step();
    129         } while (result == SQLResultRow);
    130 
    131         if (result != SQLResultDone) {
    132             db->reportExecuteStatementResult(4, SQLError::DATABASE_ERR, result);
    133             m_error = SQLError::create(SQLError::DATABASE_ERR, "could not iterate results", result, database->lastErrorMsg());
    134             return false;
    135         }
    136     } else if (result == SQLResultDone) {
    137         // Didn't find anything, or was an insert
    138         if (db->lastActionWasInsert())
    139             resultSet->setInsertId(database->lastInsertRowID());
    140     } else if (result == SQLResultFull) {
    141         // Return the Quota error - the delegate will be asked for more space and this statement might be re-run
    142         setFailureDueToQuota(db);
    143         return false;
    144     } else if (result == SQLResultConstraint) {
    145         db->reportExecuteStatementResult(6, SQLError::CONSTRAINT_ERR, result);
    146         m_error = SQLError::create(SQLError::CONSTRAINT_ERR, "could not execute statement due to a constaint failure", result, database->lastErrorMsg());
    147         return false;
    148     } else {
    149         db->reportExecuteStatementResult(5, SQLError::DATABASE_ERR, result);
    150         m_error = SQLError::create(SQLError::DATABASE_ERR, "could not execute statement", result, database->lastErrorMsg());
    151         return false;
    152     }
    153 
    154     // FIXME: If the spec allows triggers, and we want to be "accurate" in a different way, we'd use
    155     // sqlite3_total_changes() here instead of sqlite3_changed, because that includes rows modified from within a trigger
    156     // For now, this seems sufficient
    157     resultSet->setRowsAffected(database->lastChanges());
    158 
    159     m_resultSet = resultSet;
    160     db->reportExecuteStatementResult(0, -1, 0); // OK
    161     return true;
     64    m_backend = backend;
    16265}
    16366
    164 void SQLStatement::setDatabaseDeletedError(Database* database)
     67bool SQLStatement::hasCallback()
    16568{
    166     ASSERT(!m_error && !m_resultSet);
    167     database->reportExecuteStatementResult(6, SQLError::UNKNOWN_ERR, 0);
    168     m_error = SQLError::create(SQLError::UNKNOWN_ERR, "unable to execute statement, because the user deleted the database");
     69    return m_statementCallbackWrapper.hasCallback();
    16970}
    17071
    171 void SQLStatement::setVersionMismatchedError(Database* database)
     72bool SQLStatement::hasErrorCallback()
    17273{
    173     ASSERT(!m_error && !m_resultSet);
    174     database->reportExecuteStatementResult(7, SQLError::VERSION_ERR, 0);
    175     m_error = SQLError::create(SQLError::VERSION_ERR, "current version of the database and `oldVersion` argument do not match");
     74    return m_statementErrorCallbackWrapper.hasCallback();
    17675}
    17776
     
    17978{
    18079    ASSERT(transaction);
     80    ASSERT(m_backend);
    18181
    18282    bool callbackError = false;
     
    18484    RefPtr<SQLStatementCallback> callback = m_statementCallbackWrapper.unwrap();
    18585    RefPtr<SQLStatementErrorCallback> errorCallback = m_statementErrorCallbackWrapper.unwrap();
     86    RefPtr<SQLError> error = m_backend->sqlError();
    18687
    18788    // Call the appropriate statement callback and track if it resulted in an error,
    18889    // because then we need to jump to the transaction error callback.
    189     if (m_error) {
     90    if (error) {
    19091        ASSERT(errorCallback);
    191         callbackError = errorCallback->handleEvent(transaction, m_error.get());
    192     } else if (callback)
    193         callbackError = !callback->handleEvent(transaction, m_resultSet.get());
     92        callbackError = errorCallback->handleEvent(transaction, error.get());
     93    } else if (callback) {
     94        RefPtr<SQLResultSet> resultSet = m_backend->sqlResultSet();
     95        callbackError = !callback->handleEvent(transaction, resultSet.get());
     96    }
    19497
    19598    return callbackError;
    196 }
    197 
    198 void SQLStatement::setFailureDueToQuota(Database* database)
    199 {
    200     ASSERT(!m_error && !m_resultSet);
    201     database->reportExecuteStatementResult(8, SQLError::QUOTA_ERR, 0);
    202     m_error = SQLError::create(SQLError::QUOTA_ERR, "there was not enough remaining storage space, or the storage quota was reached and the user declined to allow more space");
    203 }
    204 
    205 void SQLStatement::clearFailureDueToQuota()
    206 {
    207     if (lastExecutionFailedDueToQuota())
    208         m_error = 0;
    209 }
    210 
    211 bool SQLStatement::lastExecutionFailedDueToQuota() const
    212 {
    213     return m_error && m_error->code() == SQLError::QUOTA_ERR;
    21499}
    215100
  • trunk/Source/WebCore/Modules/webdatabase/SQLStatement.h

    r127757 r143090  
    11/*
    2  * Copyright (C) 2007 Apple Inc. All rights reserved.
     2 * Copyright (C) 2007, 2013 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    4242class Database;
    4343class SQLError;
     44class SQLStatementBackend;
    4445class SQLStatementCallback;
    4546class SQLStatementErrorCallback;
    4647class SQLTransaction;
    4748
    48 class SQLStatement : public ThreadSafeRefCounted<SQLStatement> {
     49class SQLStatement {
    4950public:
    50     static PassRefPtr<SQLStatement> create(Database*, const String&, const Vector<SQLValue>&, PassRefPtr<SQLStatementCallback>, PassRefPtr<SQLStatementErrorCallback>, int permissions);
    51 
    52     bool execute(Database*);
    53     bool lastExecutionFailedDueToQuota() const;
    54 
    55     bool hasStatementCallback() const { return m_statementCallbackWrapper.hasCallback(); }
    56     bool hasStatementErrorCallback() const { return m_statementErrorCallbackWrapper.hasCallback(); }
    57 
    58     void setDatabaseDeletedError(Database*);
    59     void setVersionMismatchedError(Database*);
     51    static PassOwnPtr<SQLStatement> create(Database*,
     52        PassRefPtr<SQLStatementCallback>, PassRefPtr<SQLStatementErrorCallback>);
    6053
    6154    bool performCallback(SQLTransaction*);
    6255
    63     SQLError* sqlError() const { return m_error.get(); }
     56    void setBackend(SQLStatementBackend*);
     57
     58    bool hasCallback();
     59    bool hasErrorCallback();
     60
    6461private:
    65     SQLStatement(Database*, const String& statement, const Vector<SQLValue>& arguments, PassRefPtr<SQLStatementCallback>, PassRefPtr<SQLStatementErrorCallback>, int permissions);
     62    SQLStatement(Database*, PassRefPtr<SQLStatementCallback>, PassRefPtr<SQLStatementErrorCallback>);
    6663
    67     void setFailureDueToQuota(Database*);
    68     void clearFailureDueToQuota();
     64    // The SQLStatementBackend owns the SQLStatement. Hence, the backend is
     65    // guaranteed to be outlive the SQLStatement, and it is safe for us to refer
     66    // to the backend using a raw pointer here.
     67    SQLStatementBackend* m_backend;
    6968
    70     String m_statement;
    71     Vector<SQLValue> m_arguments;
    7269    SQLCallbackWrapper<SQLStatementCallback> m_statementCallbackWrapper;
    7370    SQLCallbackWrapper<SQLStatementErrorCallback> m_statementErrorCallbackWrapper;
    74 
    75     RefPtr<SQLError> m_error;
    76     RefPtr<SQLResultSet> m_resultSet;
    77 
    78     int m_permissions;
    7971};
    8072
  • trunk/Source/WebCore/Modules/webdatabase/SQLStatementBackend.cpp

    r142922 r143090  
    11/*
    2  * Copyright (C) 2007 Apple Inc. All rights reserved.
     2 * Copyright (C) 2007, 2013 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    2727 */
    2828#include "config.h"
    29 #include "SQLStatement.h"
     29#include "SQLStatementBackend.h"
    3030
    3131#if ENABLE(SQL_DATABASE)
    3232
    33 #include "Database.h"
     33#include "DatabaseBackendAsync.h"
    3434#include "Logging.h"
    3535#include "SQLError.h"
     36#include "SQLStatement.h"
     37#include "SQLStatementCallback.h"
     38#include "SQLStatementErrorCallback.h"
     39#include "SQLValue.h"
    3640#include "SQLiteDatabase.h"
    3741#include "SQLiteStatement.h"
    38 #include "SQLStatementCallback.h"
    39 #include "SQLStatementErrorCallback.h"
    40 #include "SQLTransaction.h"
    41 #include "SQLValue.h"
    4242#include <wtf/text/CString.h>
    4343
     44
     45// The Life-Cycle of a SQLStatement i.e. Who's keeping the SQLStatement alive?
     46// ==========================================================================
     47// The RefPtr chain goes something like this:
     48//
     49//     At birth (in SQLTransactionBackend::executeSQL()):
     50//     =================================================
     51//     SQLTransactionBackend           // Deque<RefPtr<SQLStatementBackend> > m_statementQueue points to ...
     52//     --> SQLStatementBackend         // OwnPtr<SQLStatement> m_frontend points to ...
     53//         --> SQLStatement
     54//
     55//     After grabbing the statement for execution (in SQLTransactionBackend::getNextStatement()):
     56//     =========================================================================================
     57//     SQLTransactionBackend           // RefPtr<SQLStatementBackend> m_currentStatementBackend points to ...
     58//     --> SQLStatementBackend         // OwnPtr<SQLStatement> m_frontend points to ...
     59//         --> SQLStatement
     60//
     61//     Then we execute the statement in SQLTransactionBackend::runCurrentStatementAndGetNextState().
     62//     And we callback to the script in SQLTransaction::deliverStatementCallback() if
     63//     necessary.
     64//     - Inside SQLTransaction::deliverStatementCallback(), we operate on a raw SQLStatement*.
     65//       This pointer is valid because it is owned by SQLTransactionBackend's
     66//       SQLTransactionBackend::m_currentStatementBackend.
     67//
     68//     After we're done executing the statement (in SQLTransactionBackend::getNextStatement()):
     69//     =======================================================================================
     70//     When we're done executing, we'll grab the next statement. But before we
     71//     do that, getNextStatement() nullify SQLTransactionBackend::m_currentStatementBackend.
     72//     This will trigger the deletion of the SQLStatementBackend and SQLStatement.
     73//
     74//     Note: unlike with SQLTransaction, there is no JS representation of SQLStatement.
     75//     Hence, there is no GC dependency at play here.
     76
    4477namespace WebCore {
    4578
    46 PassRefPtr<SQLStatement> SQLStatement::create(Database* database, const String& statement, const Vector<SQLValue>& arguments, PassRefPtr<SQLStatementCallback> callback, PassRefPtr<SQLStatementErrorCallback> errorCallback, int permissions)
    47 {
    48     return adoptRef(new SQLStatement(database, statement, arguments, callback, errorCallback, permissions));
    49 }
    50 
    51 SQLStatement::SQLStatement(Database* database, const String& statement, const Vector<SQLValue>& arguments, PassRefPtr<SQLStatementCallback> callback, PassRefPtr<SQLStatementErrorCallback> errorCallback, int permissions)
    52     : m_statement(statement.isolatedCopy())
     79PassRefPtr<SQLStatementBackend> SQLStatementBackend::create(PassOwnPtr<SQLStatement> frontend,
     80    const String& statement, const Vector<SQLValue>& arguments, int permissions)
     81{
     82    return adoptRef(new SQLStatementBackend(frontend, statement, arguments, permissions));
     83}
     84
     85SQLStatementBackend::SQLStatementBackend(PassOwnPtr<SQLStatement> frontend,
     86    const String& statement, const Vector<SQLValue>& arguments, int permissions)
     87    : m_frontend(frontend)
     88    , m_statement(statement.isolatedCopy())
    5389    , m_arguments(arguments)
    54     , m_statementCallbackWrapper(callback, database->scriptExecutionContext())
    55     , m_statementErrorCallbackWrapper(errorCallback, database->scriptExecutionContext())
     90    , m_hasCallback(m_frontend->hasCallback())
     91    , m_hasErrorCallback(m_frontend->hasErrorCallback())
    5692    , m_permissions(permissions)
    5793{
    58 }
    59 
    60 bool SQLStatement::execute(Database* db)
     94    m_frontend->setBackend(this);
     95}
     96
     97SQLStatement* SQLStatementBackend::frontend()
     98{
     99    return m_frontend.get();
     100}
     101
     102PassRefPtr<SQLError> SQLStatementBackend::sqlError() const
     103{
     104    return m_error;
     105}
     106
     107PassRefPtr<SQLResultSet> SQLStatementBackend::sqlResultSet() const
     108{
     109    return m_resultSet;
     110}
     111
     112bool SQLStatementBackend::execute(DatabaseBackendAsync* db)
    61113{
    62114    ASSERT(!m_resultSet);
     
    87139    }
    88140
    89     // FIXME:  If the statement uses the ?### syntax supported by sqlite, the bind parameter count is very likely off from the number of question marks.
     141    // FIXME: If the statement uses the ?### syntax supported by sqlite, the bind parameter count is very likely off from the number of question marks.
    90142    // If this is the case, they might be trying to do something fishy or malicious
    91143    if (statement.bindParameterCount() != m_arguments.size()) {
     
    162214}
    163215
    164 void SQLStatement::setDatabaseDeletedError(Database* database)
     216void SQLStatementBackend::setDatabaseDeletedError(DatabaseBackendAsync* database)
    165217{
    166218    ASSERT(!m_error && !m_resultSet);
     
    169221}
    170222
    171 void SQLStatement::setVersionMismatchedError(Database* database)
     223void SQLStatementBackend::setVersionMismatchedError(DatabaseBackendAsync* database)
    172224{
    173225    ASSERT(!m_error && !m_resultSet);
     
    176228}
    177229
    178 bool SQLStatement::performCallback(SQLTransaction* transaction)
    179 {
    180     ASSERT(transaction);
    181 
    182     bool callbackError = false;
    183 
    184     RefPtr<SQLStatementCallback> callback = m_statementCallbackWrapper.unwrap();
    185     RefPtr<SQLStatementErrorCallback> errorCallback = m_statementErrorCallbackWrapper.unwrap();
    186 
    187     // Call the appropriate statement callback and track if it resulted in an error,
    188     // because then we need to jump to the transaction error callback.
    189     if (m_error) {
    190         ASSERT(errorCallback);
    191         callbackError = errorCallback->handleEvent(transaction, m_error.get());
    192     } else if (callback)
    193         callbackError = !callback->handleEvent(transaction, m_resultSet.get());
    194 
    195     return callbackError;
    196 }
    197 
    198 void SQLStatement::setFailureDueToQuota(Database* database)
     230void SQLStatementBackend::setFailureDueToQuota(DatabaseBackendAsync* database)
    199231{
    200232    ASSERT(!m_error && !m_resultSet);
     
    203235}
    204236
    205 void SQLStatement::clearFailureDueToQuota()
     237void SQLStatementBackend::clearFailureDueToQuota()
    206238{
    207239    if (lastExecutionFailedDueToQuota())
     
    209241}
    210242
    211 bool SQLStatement::lastExecutionFailedDueToQuota() const
     243bool SQLStatementBackend::lastExecutionFailedDueToQuota() const
    212244{
    213245    return m_error && m_error->code() == SQLError::QUOTA_ERR;
  • trunk/Source/WebCore/Modules/webdatabase/SQLStatementBackend.h

    r142922 r143090  
    11/*
    2  * Copyright (C) 2007 Apple Inc. All rights reserved.
     2 * Copyright (C) 2007, 2013 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    2626 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    2727 */
    28 #ifndef SQLStatement_h
    29 #define SQLStatement_h
     28#ifndef SQLStatementBackend_h
     29#define SQLStatementBackend_h
    3030
    3131#if ENABLE(SQL_DATABASE)
    3232
    33 #include "SQLCallbackWrapper.h"
    3433#include "SQLResultSet.h"
    3534#include "SQLValue.h"
     
    4039namespace WebCore {
    4140
    42 class Database;
     41class DatabaseBackendAsync;
    4342class SQLError;
    44 class SQLStatementCallback;
    45 class SQLStatementErrorCallback;
    46 class SQLTransaction;
     43class SQLStatement;
     44class SQLTransactionBackend;
    4745
    48 class SQLStatement : public ThreadSafeRefCounted<SQLStatement> {
     46class SQLStatementBackend : public ThreadSafeRefCounted<SQLStatementBackend> {
    4947public:
    50     static PassRefPtr<SQLStatement> create(Database*, const String&, const Vector<SQLValue>&, PassRefPtr<SQLStatementCallback>, PassRefPtr<SQLStatementErrorCallback>, int permissions);
     48    static PassRefPtr<SQLStatementBackend> create(PassOwnPtr<SQLStatement>,
     49        const String& sqlStatement, const Vector<SQLValue>& arguments, int permissions);
    5150
    52     bool execute(Database*);
     51    bool execute(DatabaseBackendAsync*);
    5352    bool lastExecutionFailedDueToQuota() const;
    5453
    55     bool hasStatementCallback() const { return m_statementCallbackWrapper.hasCallback(); }
    56     bool hasStatementErrorCallback() const { return m_statementErrorCallbackWrapper.hasCallback(); }
     54    bool hasStatementCallback() const { return m_hasCallback; }
     55    bool hasStatementErrorCallback() const { return m_hasErrorCallback; }
    5756
    58     void setDatabaseDeletedError(Database*);
    59     void setVersionMismatchedError(Database*);
     57    void setDatabaseDeletedError(DatabaseBackendAsync*);
     58    void setVersionMismatchedError(DatabaseBackendAsync*);
    6059
    61     bool performCallback(SQLTransaction*);
     60    SQLStatement* frontend();
     61    PassRefPtr<SQLError> sqlError() const;
     62    PassRefPtr<SQLResultSet> sqlResultSet() const;
    6263
    63     SQLError* sqlError() const { return m_error.get(); }
    6464private:
    65     SQLStatement(Database*, const String& statement, const Vector<SQLValue>& arguments, PassRefPtr<SQLStatementCallback>, PassRefPtr<SQLStatementErrorCallback>, int permissions);
     65    SQLStatementBackend(PassOwnPtr<SQLStatement>, const String& statement,
     66        const Vector<SQLValue>& arguments, int permissions);
    6667
    67     void setFailureDueToQuota(Database*);
     68    void setFailureDueToQuota(DatabaseBackendAsync*);
    6869    void clearFailureDueToQuota();
    6970
     71    OwnPtr<SQLStatement> m_frontend;
    7072    String m_statement;
    7173    Vector<SQLValue> m_arguments;
    72     SQLCallbackWrapper<SQLStatementCallback> m_statementCallbackWrapper;
    73     SQLCallbackWrapper<SQLStatementErrorCallback> m_statementErrorCallbackWrapper;
     74    bool m_hasCallback;
     75    bool m_hasErrorCallback;
    7476
    7577    RefPtr<SQLError> m_error;
     
    8385#endif // ENABLE(SQL_DATABASE)
    8486
    85 #endif // SQLStatement_h
     87#endif // SQLStatementBackend_h
  • trunk/Source/WebCore/Modules/webdatabase/SQLTransaction.cpp

    r142921 r143090  
    171171SQLTransactionState SQLTransaction::deliverStatementCallback()
    172172{
    173     ASSERT(m_backend->m_currentStatement);
    174 
    175173    // Spec 4.3.2.6.6 and 4.3.2.6.3: If the statement callback went wrong, jump to the transaction error callback
    176174    // Otherwise, continue to loop through the statement queue
    177175    m_executeSqlAllowed = true;
    178     bool result = m_backend->m_currentStatement->performCallback(this);
     176
     177    SQLStatement* currentStatement = m_backend->currentStatement();
     178    ASSERT(currentStatement);
     179
     180    bool result = currentStatement->performCallback(this);
     181
    179182    m_executeSqlAllowed = false;
    180183
     
    189192SQLTransactionState SQLTransaction::deliverQuotaIncreaseCallback()
    190193{
    191     ASSERT(m_backend->m_currentStatement);
     194    ASSERT(m_backend->currentStatement());
    192195
    193196    bool shouldRetryCurrentStatement = m_database->transactionClient()->didExceedQuota(database());
     
    256259        permissions |= DatabaseAuthorizer::ReadOnlyMask;
    257260
    258     RefPtr<SQLStatement> statement = SQLStatement::create(m_database.get(), sqlStatement, arguments, callback, callbackError, permissions);
    259 
    260     if (m_database->deleted())
    261         statement->setDatabaseDeletedError(m_database.get());
    262 
    263     m_backend->enqueueStatement(statement);
     261    OwnPtr<SQLStatement> statement = SQLStatement::create(m_database.get(), callback, callbackError);
     262    m_backend->executeSQL(statement.release(), sqlStatement, arguments, permissions);
    264263}
    265264
  • trunk/Source/WebCore/Modules/webdatabase/SQLTransactionBackend.cpp

    r142921 r143090  
    3434#include "Database.h"
    3535#include "DatabaseAuthorizer.h"
     36#include "DatabaseBackendAsync.h"
    3637#include "DatabaseBackendContext.h"
    3738#include "DatabaseThread.h"
     
    4041#include "SQLError.h"
    4142#include "SQLStatement.h"
     43#include "SQLStatementBackend.h"
    4244#include "SQLStatementCallback.h" // FIXME: remove when SQLStatement has been refactored.
    4345#include "SQLStatementErrorCallback.h" // FIXME: remove when SQLStatement has been refactored.
     
    231233
    232234
    233 // The Life-Cycle of a SQLTransaction i.e. Who's keeping the SQLTransactionAlive?
    234 // =============================================================================
     235// The Life-Cycle of a SQLTransaction i.e. Who's keeping the SQLTransaction alive?
     236// ==============================================================================
    235237// The RefPtr chain goes something like this:
    236238//
    237239//     At birth (in DatabaseBackendAsync::runTransaction()):
    238240//     ====================================================
    239 //     DatabaseBackendAsync               // in Deque<RefPtr<SQLTransactionBackend> > m_transactionQueue points to ...
    240 //     --> SQLTransactionBackend          // in RefPtr<SQLTransaction> m_frontend points to ...
    241 //         --> SQLTransaction             // in RefPtr<SQLTransactionBackend> m_backend points to ...
     241//     DatabaseBackendAsync               // Deque<RefPtr<SQLTransactionBackend> > m_transactionQueue points to ...
     242//     --> SQLTransactionBackend          // RefPtr<SQLTransaction> m_frontend points to ...
     243//         --> SQLTransaction             // RefPtr<SQLTransactionBackend> m_backend points to ...
    242244//             --> SQLTransactionBackend  // which is a circular reference.
    243245//
     
    250252//     After scheduling the transaction with the DatabaseThread (DatabaseBackendAsync::scheduleTransaction()):
    251253//     ======================================================================================================
    252 //     DatabaseThread                         // in MessageQueue<DatabaseTask> m_queue points to ...
    253 //     --> DatabaseTransactionTask            // in RefPtr<SQLTransactionBackend> m_transaction points to ...
    254 //         --> SQLTransactionBackend          // in RefPtr<SQLTransaction> m_frontend points to ...
    255 //             --> SQLTransaction             // in RefPtr<SQLTransactionBackend> m_backend points to ...
     254//     DatabaseThread                         // MessageQueue<DatabaseTask> m_queue points to ...
     255//     --> DatabaseTransactionTask            // RefPtr<SQLTransactionBackend> m_transaction points to ...
     256//         --> SQLTransactionBackend          // RefPtr<SQLTransaction> m_frontend points to ...
     257//             --> SQLTransaction             // RefPtr<SQLTransactionBackend> m_backend points to ...
    256258//                 --> SQLTransactionBackend  // which is a circular reference.
    257259//
     
    259261//     ====================================================================
    260262//     OwnPtr<DatabaseTask> task;             // points to ...
    261 //     --> DatabaseTransactionTask            // in RefPtr<SQLTransactionBackend> m_transaction points to ...
    262 //         --> SQLTransactionBackend          // in: RefPtr<SQLTransaction> m_frontend;
    263 //             --> SQLTransaction             // in RefPtr<SQLTransactionBackend> m_backend points to ...
     263//     --> DatabaseTransactionTask            // RefPtr<SQLTransactionBackend> m_transaction points to ...
     264//         --> SQLTransactionBackend          // RefPtr<SQLTransaction> m_frontend;
     265//             --> SQLTransaction             // RefPtr<SQLTransactionBackend> m_backend points to ...
    264266//                 --> SQLTransactionBackend  // which is a circular reference.
    265267//
     
    371373    // we've already shut down the transaction.
    372374
    373     m_currentStatement = 0;
     375    m_currentStatementBackend = 0;
    374376    m_wrapper = 0;
    375377    m_transactionError = 0;
     378}
     379
     380SQLStatement* SQLTransactionBackend::currentStatement()
     381{
     382    return m_currentStatementBackend->frontend();
    376383}
    377384
     
    411418}
    412419
    413 void SQLTransactionBackend::enqueueStatement(PassRefPtr<SQLStatement> statement)
     420void SQLTransactionBackend::enqueueStatementBackend(PassRefPtr<SQLStatementBackend> statementBackend)
    414421{
    415422    MutexLocker locker(m_statementMutex);
    416     m_statementQueue.append(statement);
     423    m_statementQueue.append(statementBackend);
    417424}
    418425
     
    455462    checkAndHandleClosedOrInterruptedDatabase();
    456463    runStateMachine();
     464}
     465
     466void SQLTransactionBackend::executeSQL(PassOwnPtr<SQLStatement> statement,
     467    const String& sqlStatement, const Vector<SQLValue>& arguments, int permissions)
     468{
     469    RefPtr<SQLStatementBackend> statementBackend;
     470    statementBackend = SQLStatementBackend::create(statement, sqlStatement, arguments, permissions);
     471
     472    if (Database::from(m_database.get())->deleted())
     473        statementBackend->setDatabaseDeletedError(m_database.get());
     474
     475    enqueueStatementBackend(statementBackend);
    457476}
    458477
     
    578597            // If the current statement has already been run, failed due to quota constraints, and we're not retrying it,
    579598            // that means it ended in an error. Handle it now
    580             if (m_currentStatement && m_currentStatement->lastExecutionFailedDueToQuota()) {
     599            if (m_currentStatementBackend && m_currentStatementBackend->lastExecutionFailedDueToQuota()) {
    581600                return nextStateForCurrentStatementError();
    582601            }
     
    593612void SQLTransactionBackend::getNextStatement()
    594613{
    595     m_currentStatement = 0;
     614    m_currentStatementBackend = 0;
    596615
    597616    MutexLocker locker(m_statementMutex);
    598617    if (!m_statementQueue.isEmpty())
    599         m_currentStatement = m_statementQueue.takeFirst();
     618        m_currentStatementBackend = m_statementQueue.takeFirst();
    600619}
    601620
    602621SQLTransactionState SQLTransactionBackend::runCurrentStatementAndGetNextState()
    603622{
    604     if (!m_currentStatement) {
     623    if (!m_currentStatementBackend) {
    605624        // No more statements to run. So move on to the next state.
    606625        return SQLTransactionState::PostflightAndCommit;
     
    610629
    611630    if (m_hasVersionMismatch)
    612         m_currentStatement->setVersionMismatchedError(Database::from(m_database.get()));
    613 
    614     if (m_currentStatement->execute(Database::from(m_database.get()))) {
     631        m_currentStatementBackend->setVersionMismatchedError(Database::from(m_database.get()));
     632
     633    if (m_currentStatementBackend->execute(m_database.get())) {
    615634        if (m_database->lastActionChangedDatabase()) {
    616635            // Flag this transaction as having changed the database for later delegate notification
     
    620639        }
    621640
    622         if (m_currentStatement->hasStatementCallback()) {
     641        if (m_currentStatementBackend->hasStatementCallback()) {
    623642            return SQLTransactionState::DeliverStatementCallback;
    624643        }
     
    629648    }
    630649
    631     if (m_currentStatement->lastExecutionFailedDueToQuota()) {
     650    if (m_currentStatementBackend->lastExecutionFailedDueToQuota()) {
    632651        return SQLTransactionState::DeliverQuotaIncreaseCallback;
    633652    }
     
    640659    // Spec 4.3.2.6.6: error - Call the statement's error callback, but if there was no error callback,
    641660    // or the transaction was rolled back, jump to the transaction error callback
    642     if (m_currentStatement->hasStatementErrorCallback() && !m_sqliteTransaction->wasRolledBackBySqlite())
     661    if (m_currentStatementBackend->hasStatementErrorCallback() && !m_sqliteTransaction->wasRolledBackBySqlite())
    643662        return SQLTransactionState::DeliverStatementCallback;
    644663
    645     m_transactionError = m_currentStatement->sqlError();
     664    m_transactionError = m_currentStatementBackend->sqlError();
    646665    if (!m_transactionError) {
    647666        m_database->reportCommitTransactionResult(1, SQLError::DATABASE_ERR, 0);
  • trunk/Source/WebCore/Modules/webdatabase/SQLTransactionBackend.h

    r142921 r143090  
    3232
    3333#include "DatabaseBasicTypes.h"
    34 #include "SQLStatement.h"
    3534#include "SQLTransactionStateMachine.h"
    3635#include <wtf/Deque.h>
    3736#include <wtf/Forward.h>
     37#include <wtf/text/WTFString.h>
    3838
    3939namespace WebCore {
     
    4242class SQLError;
    4343class SQLiteTransaction;
     44class SQLStatement;
     45class SQLStatementBackend;
    4446class SQLTransaction;
    4547class SQLTransactionBackend;
     
    6971    void notifyDatabaseThreadIsShuttingDown();
    7072
     73    // APIs for the frontend:
     74    SQLStatement* currentStatement();
    7175    PassRefPtr<SQLError> transactionError();
    7276    void setShouldRetryCurrentStatement(bool);
     77
     78    void executeSQL(PassOwnPtr<SQLStatement>, const String& statement,
     79        const Vector<SQLValue>& arguments, int permissions);
    7380
    7481private:
     
    7885    void doCleanup();
    7986
    80     void enqueueStatement(PassRefPtr<SQLStatement>);
     87    void enqueueStatementBackend(PassRefPtr<SQLStatementBackend>);
    8188
    8289    void checkAndHandleClosedOrInterruptedDatabase();
     
    104111
    105112    RefPtr<SQLTransaction> m_frontend;
    106     RefPtr<SQLStatement> m_currentStatement;
     113    RefPtr<SQLStatementBackend> m_currentStatementBackend;
    107114
    108115    RefPtr<DatabaseBackendAsync> m_database;
     
    120127
    121128    Mutex m_statementMutex;
    122     Deque<RefPtr<SQLStatement> > m_statementQueue;
     129    Deque<RefPtr<SQLStatementBackend> > m_statementQueue;
    123130
    124131    OwnPtr<SQLiteTransaction> m_sqliteTransaction;
  • trunk/Source/WebCore/Target.pri

    r142957 r143090  
    14821482    Modules/webdatabase/SQLResultSetRowList.h \
    14831483    Modules/webdatabase/SQLStatement.h \
     1484    Modules/webdatabase/SQLStatementBackend.h \
    14841485    Modules/webdatabase/SQLStatementSync.h \
    14851486    Modules/webdatabase/SQLTransaction.h \
     
    30733074        Modules/webdatabase/SQLResultSetRowList.cpp \
    30743075        Modules/webdatabase/SQLStatement.cpp \
     3076        Modules/webdatabase/SQLStatementBackend.cpp \
    30753077        Modules/webdatabase/SQLStatementSync.cpp \
    30763078        Modules/webdatabase/SQLTransaction.cpp \
  • trunk/Source/WebCore/WebCore.gypi

    r142957 r143090  
    10291029            'Modules/webdatabase/SQLResultSetRowList.cpp',
    10301030            'Modules/webdatabase/SQLStatement.cpp',
     1031            'Modules/webdatabase/SQLStatement.h',
     1032            'Modules/webdatabase/SQLStatementBackend.cpp',
     1033            'Modules/webdatabase/SQLStatementBackend.h',
    10311034            'Modules/webdatabase/SQLStatementSync.cpp',
    10321035            'Modules/webdatabase/SQLStatementSync.h',
  • trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj

    r142921 r143090  
    2557925579                                </File>
    2558025580                                <File
     25581                                        RelativePath="..\Modules\webdatabase\SQLStatementBackend.cpp"
     25582                                        >
     25583                                </File>
     25584                                <File
     25585                                        RelativePath="..\Modules\webdatabase\SQLStatementBackend.h"
     25586                                        >
     25587                                </File>
     25588                                <File
    2558125589                                        RelativePath="..\Modules\webdatabase\SQLStatementCallback.h"
    2558225590                                        >
  • trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj

    r142954 r143090  
    18751875    <ClCompile Include="..\Modules\webdatabase\SQLResultSetRowList.cpp" />
    18761876    <ClCompile Include="..\Modules\webdatabase\SQLStatement.cpp" />
     1877    <ClCompile Include="..\Modules\webdatabase\SQLStatementBackend.cpp" />
    18771878    <ClCompile Include="..\Modules\webdatabase\SQLStatementSync.cpp" />
    18781879    <ClCompile Include="..\Modules\webdatabase\SQLTransaction.cpp" />
     
    64466447    <ClInclude Include="..\Modules\webdatabase\SQLResultSetRowList.h" />
    64476448    <ClInclude Include="..\Modules\webdatabase\SQLStatement.h" />
     6449    <ClInclude Include="..\Modules\webdatabase\SQLStatementBackend.h" />
    64486450    <ClInclude Include="..\Modules\webdatabase\SQLStatementCallback.h" />
    64496451    <ClInclude Include="..\Modules\webdatabase\SQLStatementErrorCallback.h" />
  • trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters

    r142954 r143090  
    18941894      <Filter>Modules\webdatabase</Filter>
    18951895    </ClCompile>
     1896    <ClCompile Include="..\Modules\webdatabase\SQLStatementBackend.cpp">
     1897      <Filter>Modules\webdatabase</Filter>
     1898    </ClCompile>
    18961899    <ClCompile Include="..\Modules\webdatabase\SQLStatementSync.cpp">
    18971900      <Filter>Modules\webdatabase</Filter>
     
    85648567    </ClInclude>
    85658568    <ClInclude Include="..\Modules\webdatabase\SQLStatement.h">
     8569      <Filter>Modules\webdatabase</Filter>
     8570    </ClInclude>
     8571    <ClInclude Include="..\Modules\webdatabase\SQLStatementBackend.h">
    85668572      <Filter>Modules\webdatabase</Filter>
    85678573    </ClInclude>
  • trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj

    r142957 r143090  
    37433743                97BC6A471505F081001B74AC /* SQLStatement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 97BC6A051505F081001B74AC /* SQLStatement.cpp */; };
    37443744                97BC6A481505F081001B74AC /* SQLStatement.h in Headers */ = {isa = PBXBuildFile; fileRef = 97BC6A061505F081001B74AC /* SQLStatement.h */; };
     3745                FE8A674716CDD19E00930BF8 /* SQLStatementBackend.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FE8A674516CDD19E00930BF8 /* SQLStatementBackend.cpp */; };
     3746                FE8A674816CDD19E00930BF8 /* SQLStatementBackend.h in Headers */ = {isa = PBXBuildFile; fileRef = FE8A674616CDD19E00930BF8 /* SQLStatementBackend.h */; };
    37453747                97BC6A491505F081001B74AC /* SQLStatementCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = 97BC6A071505F081001B74AC /* SQLStatementCallback.h */; };
    37463748                97BC6A4B1505F081001B74AC /* SQLStatementErrorCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = 97BC6A091505F081001B74AC /* SQLStatementErrorCallback.h */; };
     
    1121111213                97BC6A051505F081001B74AC /* SQLStatement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SQLStatement.cpp; path = Modules/webdatabase/SQLStatement.cpp; sourceTree = "<group>"; };
    1121211214                97BC6A061505F081001B74AC /* SQLStatement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SQLStatement.h; path = Modules/webdatabase/SQLStatement.h; sourceTree = "<group>"; };
     11215                FE8A674516CDD19E00930BF8 /* SQLStatementBackend.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SQLStatementBackend.cpp; path = Modules/webdatabase/SQLStatementBackend.cpp; sourceTree = "<group>"; };
     11216                FE8A674616CDD19E00930BF8 /* SQLStatementBackend.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SQLStatementBackend.h; path = Modules/webdatabase/SQLStatementBackend.h; sourceTree = "<group>"; };
    1121311217                97BC6A071505F081001B74AC /* SQLStatementCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SQLStatementCallback.h; path = Modules/webdatabase/SQLStatementCallback.h; sourceTree = "<group>"; };
    1121411218                97BC6A081505F081001B74AC /* SQLStatementCallback.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = SQLStatementCallback.idl; path = Modules/webdatabase/SQLStatementCallback.idl; sourceTree = "<group>"; };
     
    1869618700                                97BC6A051505F081001B74AC /* SQLStatement.cpp */,
    1869718701                                97BC6A061505F081001B74AC /* SQLStatement.h */,
     18702                                FE8A674516CDD19E00930BF8 /* SQLStatementBackend.cpp */,
     18703                                FE8A674616CDD19E00930BF8 /* SQLStatementBackend.h */,
    1869818704                                97BC6A071505F081001B74AC /* SQLStatementCallback.h */,
    1869918705                                97BC6A081505F081001B74AC /* SQLStatementCallback.idl */,
     
    2594625952                                97BC6A451505F081001B74AC /* SQLResultSetRowList.h in Headers */,
    2594725953                                97BC6A481505F081001B74AC /* SQLStatement.h in Headers */,
     25954                                FE8A674816CDD19E00930BF8 /* SQLStatementBackend.h in Headers */,
    2594825955                                97BC6A491505F081001B74AC /* SQLStatementCallback.h in Headers */,
    2594925956                                97BC6A4B1505F081001B74AC /* SQLStatementErrorCallback.h in Headers */,
     
    2925129258                                97BC6A441505F081001B74AC /* SQLResultSetRowList.cpp in Sources */,
    2925229259                                97BC6A471505F081001B74AC /* SQLStatement.cpp in Sources */,
     29260                                FE8A674716CDD19E00930BF8 /* SQLStatementBackend.cpp in Sources */,
    2925329261                                97BC6A4D1505F081001B74AC /* SQLStatementSync.cpp in Sources */,
    2925429262                                97BC6A4F1505F081001B74AC /* SQLTransaction.cpp in Sources */,
Note: See TracChangeset for help on using the changeset viewer.