| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007, 2013 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2013 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 SQLStatementBackend::SQLStatementBackend(SQLStatement* frontend, | 80 SQLStatementBackend::SQLStatementBackend(SQLStatement* frontend, |
| 81 const String& statement, const Vector<SQLValue>& arguments, int permissions) | 81 const String& statement, const Vector<SQLValue>& arguments, int permissions) |
| 82 : m_frontend(frontend) | 82 : m_frontend(frontend) |
| 83 , m_statement(statement.isolatedCopy()) | 83 , m_statement(statement.isolatedCopy()) |
| 84 , m_arguments(arguments) | 84 , m_arguments(arguments) |
| 85 , m_hasCallback(m_frontend->hasCallback()) | 85 , m_hasCallback(m_frontend->hasCallback()) |
| 86 , m_hasErrorCallback(m_frontend->hasErrorCallback()) | 86 , m_hasErrorCallback(m_frontend->hasErrorCallback()) |
| 87 , m_resultSet(SQLResultSet::create()) | 87 , m_resultSet(SQLResultSet::create()) |
| 88 , m_permissions(permissions) | 88 , m_permissions(permissions) |
| 89 { | 89 { |
| 90 DCHECK(isMainThread()); |
| 91 |
| 90 m_frontend->setBackend(this); | 92 m_frontend->setBackend(this); |
| 91 } | 93 } |
| 92 | 94 |
| 93 DEFINE_TRACE(SQLStatementBackend) | 95 DEFINE_TRACE(SQLStatementBackend) |
| 94 { | 96 { |
| 95 visitor->trace(m_frontend); | 97 visitor->trace(m_frontend); |
| 96 visitor->trace(m_resultSet); | 98 visitor->trace(m_resultSet); |
| 97 } | 99 } |
| 98 | 100 |
| 99 SQLStatement* SQLStatementBackend::frontend() | 101 SQLStatement* SQLStatementBackend::frontend() |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 231 if (lastExecutionFailedDueToQuota()) | 233 if (lastExecutionFailedDueToQuota()) |
| 232 m_error = nullptr; | 234 m_error = nullptr; |
| 233 } | 235 } |
| 234 | 236 |
| 235 bool SQLStatementBackend::lastExecutionFailedDueToQuota() const | 237 bool SQLStatementBackend::lastExecutionFailedDueToQuota() const |
| 236 { | 238 { |
| 237 return m_error && m_error->code() == SQLError::QUOTA_ERR; | 239 return m_error && m_error->code() == SQLError::QUOTA_ERR; |
| 238 } | 240 } |
| 239 | 241 |
| 240 } // namespace blink | 242 } // namespace blink |
| OLD | NEW |