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

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

Issue 176853004: Oilpan: move core/fileapi to oilpan's heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebased Created 6 years, 9 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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 { 105 {
106 ASSERT(m_state == Finished || m_contextStopped); 106 ASSERT(m_state == Finished || m_contextStopped);
107 ASSERT(m_requestList.isEmpty() || m_contextStopped); 107 ASSERT(m_requestList.isEmpty() || m_contextStopped);
108 } 108 }
109 109
110 const String& IDBTransaction::mode() const 110 const String& IDBTransaction::mode() const
111 { 111 {
112 return modeToString(m_mode); 112 return modeToString(m_mode);
113 } 113 }
114 114
115 void IDBTransaction::setError(PassRefPtr<DOMError> error) 115 void IDBTransaction::setError(PassRefPtrWillBeRawPtr<DOMError> error)
116 { 116 {
117 ASSERT(m_state != Finished); 117 ASSERT(m_state != Finished);
118 ASSERT(error); 118 ASSERT(error);
119 119
120 // The first error to be set is the true cause of the 120 // The first error to be set is the true cause of the
121 // transaction abort. 121 // transaction abort.
122 if (!m_error) { 122 if (!m_error) {
123 m_error = error; 123 m_error = error;
124 } 124 }
125 } 125 }
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 m_requestList.add(request); 218 m_requestList.add(request);
219 } 219 }
220 220
221 void IDBTransaction::unregisterRequest(IDBRequest* request) 221 void IDBTransaction::unregisterRequest(IDBRequest* request)
222 { 222 {
223 ASSERT(request); 223 ASSERT(request);
224 // If we aborted the request, it will already have been removed. 224 // If we aborted the request, it will already have been removed.
225 m_requestList.remove(request); 225 m_requestList.remove(request);
226 } 226 }
227 227
228 void IDBTransaction::onAbort(PassRefPtr<DOMError> prpError) 228 void IDBTransaction::onAbort(PassRefPtrWillBeRawPtr<DOMError> prpError)
229 { 229 {
230 IDB_TRACE("IDBTransaction::onAbort"); 230 IDB_TRACE("IDBTransaction::onAbort");
231 if (m_contextStopped) { 231 if (m_contextStopped) {
232 RefPtr<IDBTransaction> protect(this); 232 RefPtr<IDBTransaction> protect(this);
233 m_database->transactionFinished(this); 233 m_database->transactionFinished(this);
234 return; 234 return;
235 } 235 }
236 236
237 RefPtr<DOMError> error = prpError; 237 RefPtrWillBeRawPtr<DOMError> error = prpError;
238 ASSERT(m_state != Finished); 238 ASSERT(m_state != Finished);
239 239
240 if (m_state != Finishing) { 240 if (m_state != Finishing) {
241 ASSERT(error.get()); 241 ASSERT(error.get());
242 setError(error.release()); 242 setError(error.release());
243 243
244 // Abort was not triggered by front-end, so outstanding requests must 244 // Abort was not triggered by front-end, so outstanding requests must
245 // be aborted now. 245 // be aborted now.
246 while (!m_requestList.isEmpty()) { 246 while (!m_requestList.isEmpty()) {
247 RefPtr<IDBRequest> request = *m_requestList.begin(); 247 RefPtr<IDBRequest> request = *m_requestList.begin();
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 event->setTarget(this); 392 event->setTarget(this);
393 eventQueue->enqueueEvent(event); 393 eventQueue->enqueueEvent(event);
394 } 394 }
395 395
396 blink::WebIDBDatabase* IDBTransaction::backendDB() const 396 blink::WebIDBDatabase* IDBTransaction::backendDB() const
397 { 397 {
398 return m_database->backend(); 398 return m_database->backend();
399 } 399 }
400 400
401 } // namespace WebCore 401 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/modules/indexeddb/IDBTransaction.h ('k') | Source/modules/indexeddb/IDBTransactionTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698