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

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

Issue 235883002: IndexedDB: Make sure indexing completes if object store is deleted (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « Source/modules/indexeddb/IDBCursor.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 EventTarget* target = event->target(); 326 EventTarget* target = event->target();
327 IDBRequest* request = static_cast<IDBRequest*>(target); 327 IDBRequest* request = static_cast<IDBRequest*>(target);
328 328
329 RefPtr<IDBAny> cursorAny = request->resultAsAny(); 329 RefPtr<IDBAny> cursorAny = request->resultAsAny();
330 RefPtr<IDBCursorWithValue> cursor; 330 RefPtr<IDBCursorWithValue> cursor;
331 if (cursorAny->type() == IDBAny::IDBCursorWithValueType) 331 if (cursorAny->type() == IDBAny::IDBCursorWithValueType)
332 cursor = cursorAny->idbCursorWithValue(); 332 cursor = cursorAny->idbCursorWithValue();
333 333
334 Vector<int64_t> indexIds; 334 Vector<int64_t> indexIds;
335 indexIds.append(m_indexMetadata.id); 335 indexIds.append(m_indexMetadata.id);
336 if (cursor) { 336 if (cursor && !cursor->isDeleted()) {
337 cursor->continueFunction(static_cast<IDBKey*>(0), static_cast<IDBKey *>(0), ASSERT_NO_EXCEPTION); 337 cursor->continueFunction(static_cast<IDBKey*>(0), static_cast<IDBKey *>(0), ASSERT_NO_EXCEPTION);
338 338
339 RefPtr<IDBKey> primaryKey = cursor->idbPrimaryKey(); 339 RefPtr<IDBKey> primaryKey = cursor->idbPrimaryKey();
340 ScriptValue value = cursor->value(context); 340 ScriptValue value = cursor->value(context);
341 341
342 IDBObjectStore::IndexKeys indexKeys; 342 IDBObjectStore::IndexKeys indexKeys;
343 generateIndexKeysForValue(request->requestState(), m_indexMetadata, value, &indexKeys); 343 generateIndexKeysForValue(request->requestState(), m_indexMetadata, value, &indexKeys);
344 344
345 Vector<IDBObjectStore::IndexKeys> indexKeysList; 345 Vector<IDBObjectStore::IndexKeys> indexKeysList;
346 indexKeysList.append(indexKeys); 346 indexKeysList.append(indexKeys);
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
618 } 618 }
619 return IDBIndexMetadata::InvalidId; 619 return IDBIndexMetadata::InvalidId;
620 } 620 }
621 621
622 WebIDBDatabase* IDBObjectStore::backendDB() const 622 WebIDBDatabase* IDBObjectStore::backendDB() const
623 { 623 {
624 return m_transaction->backendDB(); 624 return m_transaction->backendDB();
625 } 625 }
626 626
627 } // namespace WebCore 627 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/modules/indexeddb/IDBCursor.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698