Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(850)

Side by Side Diff: third_party/WebKit/Source/modules/indexeddb/IDBTransaction.cpp

Issue 2815313002: Reland of Move ScriptState::GetExecutionContext (Part 5) (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698