| 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 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 void SQLStatementBackend::setFailureDueToQuota(DatabaseBackend* database) | 218 void SQLStatementBackend::setFailureDueToQuota(DatabaseBackend* database) |
| 219 { | 219 { |
| 220 ASSERT(!m_error && !m_resultSet); | 220 ASSERT(!m_error && !m_resultSet); |
| 221 database->reportExecuteStatementResult(8, SQLError::QUOTA_ERR, 0); | 221 database->reportExecuteStatementResult(8, SQLError::QUOTA_ERR, 0); |
| 222 m_error = SQLError::create(SQLError::QUOTA_ERR, "there was not enough remain
ing storage space, or the storage quota was reached and the user declined to all
ow more space"); | 222 m_error = SQLError::create(SQLError::QUOTA_ERR, "there was not enough remain
ing storage space, or the storage quota was reached and the user declined to all
ow more space"); |
| 223 } | 223 } |
| 224 | 224 |
| 225 void SQLStatementBackend::clearFailureDueToQuota() | 225 void SQLStatementBackend::clearFailureDueToQuota() |
| 226 { | 226 { |
| 227 if (lastExecutionFailedDueToQuota()) | 227 if (lastExecutionFailedDueToQuota()) |
| 228 m_error = 0; | 228 m_error = nullptr; |
| 229 } | 229 } |
| 230 | 230 |
| 231 bool SQLStatementBackend::lastExecutionFailedDueToQuota() const | 231 bool SQLStatementBackend::lastExecutionFailedDueToQuota() const |
| 232 { | 232 { |
| 233 return m_error && m_error->code() == SQLError::QUOTA_ERR; | 233 return m_error && m_error->code() == SQLError::QUOTA_ERR; |
| 234 } | 234 } |
| 235 | 235 |
| 236 } // namespace WebCore | 236 } // namespace WebCore |
| OLD | NEW |