| 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 16 matching lines...) Expand all Loading... |
| 27 */ | 27 */ |
| 28 | 28 |
| 29 #include "modules/webdatabase/SQLStatementBackend.h" | 29 #include "modules/webdatabase/SQLStatementBackend.h" |
| 30 | 30 |
| 31 #include "modules/webdatabase/Database.h" | 31 #include "modules/webdatabase/Database.h" |
| 32 #include "modules/webdatabase/SQLError.h" | 32 #include "modules/webdatabase/SQLError.h" |
| 33 #include "modules/webdatabase/SQLStatement.h" | 33 #include "modules/webdatabase/SQLStatement.h" |
| 34 #include "modules/webdatabase/StorageLog.h" | 34 #include "modules/webdatabase/StorageLog.h" |
| 35 #include "modules/webdatabase/sqlite/SQLiteDatabase.h" | 35 #include "modules/webdatabase/sqlite/SQLiteDatabase.h" |
| 36 #include "modules/webdatabase/sqlite/SQLiteStatement.h" | 36 #include "modules/webdatabase/sqlite/SQLiteStatement.h" |
| 37 #include "wtf/text/CString.h" | 37 #include "platform/wtf/text/CString.h" |
| 38 | 38 |
| 39 // The Life-Cycle of a SQLStatement i.e. Who's keeping the SQLStatement alive? | 39 // The Life-Cycle of a SQLStatement i.e. Who's keeping the SQLStatement alive? |
| 40 // ========================================================================== | 40 // ========================================================================== |
| 41 // The RefPtr chain goes something like this: | 41 // The RefPtr chain goes something like this: |
| 42 // | 42 // |
| 43 // At birth (in SQLTransactionBackend::executeSQL()): | 43 // At birth (in SQLTransactionBackend::executeSQL()): |
| 44 // ================================================= | 44 // ================================================= |
| 45 // SQLTransactionBackend | 45 // SQLTransactionBackend |
| 46 // // HeapDeque<Member<SQLStatementBackend>> m_statementQueue | 46 // // HeapDeque<Member<SQLStatementBackend>> m_statementQueue |
| 47 // // points to ... | 47 // // points to ... |
| (...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 void SQLStatementBackend::ClearFailureDueToQuota() { | 266 void SQLStatementBackend::ClearFailureDueToQuota() { |
| 267 if (LastExecutionFailedDueToQuota()) | 267 if (LastExecutionFailedDueToQuota()) |
| 268 error_ = nullptr; | 268 error_ = nullptr; |
| 269 } | 269 } |
| 270 | 270 |
| 271 bool SQLStatementBackend::LastExecutionFailedDueToQuota() const { | 271 bool SQLStatementBackend::LastExecutionFailedDueToQuota() const { |
| 272 return error_ && error_->Code() == SQLError::kQuotaErr; | 272 return error_ && error_->Code() == SQLError::kQuotaErr; |
| 273 } | 273 } |
| 274 | 274 |
| 275 } // namespace blink | 275 } // namespace blink |
| OLD | NEW |