| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google 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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 DCHECK(!scope_.IsEmpty()) << "Observer transactions must operate " | 118 DCHECK(!scope_.IsEmpty()) << "Observer transactions must operate " |
| 119 "on a well-defined set of stores"; | 119 "on a well-defined set of stores"; |
| 120 database_->TransactionCreated(this); | 120 database_->TransactionCreated(this); |
| 121 } | 121 } |
| 122 | 122 |
| 123 IDBTransaction::IDBTransaction(ScriptState* script_state, | 123 IDBTransaction::IDBTransaction(ScriptState* script_state, |
| 124 int64_t id, | 124 int64_t id, |
| 125 const HashSet<String>& scope, | 125 const HashSet<String>& scope, |
| 126 WebIDBTransactionMode mode, | 126 WebIDBTransactionMode mode, |
| 127 IDBDatabase* db) | 127 IDBDatabase* db) |
| 128 : ContextLifecycleObserver(script_state->GetExecutionContext()), | 128 : ContextLifecycleObserver(ExecutionContext::From(script_state)), |
| 129 id_(id), | 129 id_(id), |
| 130 database_(db), | 130 database_(db), |
| 131 mode_(mode), | 131 mode_(mode), |
| 132 scope_(scope) { | 132 scope_(scope) { |
| 133 DCHECK(database_); | 133 DCHECK(database_); |
| 134 DCHECK(!scope_.IsEmpty()) << "Non-versionchange transactions must operate " | 134 DCHECK(!scope_.IsEmpty()) << "Non-versionchange transactions must operate " |
| 135 "on a well-defined set of stores"; | 135 "on a well-defined set of stores"; |
| 136 DCHECK(mode_ == kWebIDBTransactionModeReadOnly || | 136 DCHECK(mode_ == kWebIDBTransactionModeReadOnly || |
| 137 mode_ == kWebIDBTransactionModeReadWrite) | 137 mode_ == kWebIDBTransactionModeReadWrite) |
| 138 << "Invalid transaction mode"; | 138 << "Invalid transaction mode"; |
| (...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 598 IDBObjectStore* object_store = it.key; | 598 IDBObjectStore* object_store = it.key; |
| 599 object_store->ClearIndexCache(); | 599 object_store->ClearIndexCache(); |
| 600 } | 600 } |
| 601 old_store_metadata_.Clear(); | 601 old_store_metadata_.Clear(); |
| 602 | 602 |
| 603 deleted_indexes_.Clear(); | 603 deleted_indexes_.Clear(); |
| 604 deleted_object_stores_.Clear(); | 604 deleted_object_stores_.Clear(); |
| 605 } | 605 } |
| 606 | 606 |
| 607 } // namespace blink | 607 } // namespace blink |
| OLD | NEW |