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 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
355 m_state = Finished; | 355 m_state = Finished; |
356 | 356 |
357 // Break reference cycles. | 357 // Break reference cycles. |
358 for (IDBObjectStoreMap::iterator it = m_objectStoreMap.begin(); it != m_obje
ctStoreMap.end(); ++it) | 358 for (IDBObjectStoreMap::iterator it = m_objectStoreMap.begin(); it != m_obje
ctStoreMap.end(); ++it) |
359 it->value->transactionFinished(); | 359 it->value->transactionFinished(); |
360 m_objectStoreMap.clear(); | 360 m_objectStoreMap.clear(); |
361 for (IDBObjectStoreSet::iterator it = m_deletedObjectStores.begin(); it != m
_deletedObjectStores.end(); ++it) | 361 for (IDBObjectStoreSet::iterator it = m_deletedObjectStores.begin(); it != m
_deletedObjectStores.end(); ++it) |
362 (*it)->transactionFinished(); | 362 (*it)->transactionFinished(); |
363 m_deletedObjectStores.clear(); | 363 m_deletedObjectStores.clear(); |
364 | 364 |
365 Vector<RefPtr<EventTarget> > targets; | 365 WillBeHeapVector<RefPtrWillBeMember<EventTarget> > targets; |
366 targets.append(this); | 366 targets.append(this); |
367 targets.append(db()); | 367 targets.append(db()); |
368 | 368 |
369 // FIXME: When we allow custom event dispatching, this will probably need to
change. | 369 // FIXME: When we allow custom event dispatching, this will probably need to
change. |
370 ASSERT(event->type() == EventTypeNames::complete || event->type() == EventTy
peNames::abort); | 370 ASSERT(event->type() == EventTypeNames::complete || event->type() == EventTy
peNames::abort); |
371 bool returnValue = IDBEventDispatcher::dispatch(event.get(), targets); | 371 bool returnValue = IDBEventDispatcher::dispatch(event.get(), targets); |
372 // FIXME: Try to construct a test where |this| outlives openDBRequest and we | 372 // FIXME: Try to construct a test where |this| outlives openDBRequest and we |
373 // get a crash. | 373 // get a crash. |
374 if (m_openDBRequest) { | 374 if (m_openDBRequest) { |
375 ASSERT(isVersionChange()); | 375 ASSERT(isVersionChange()); |
(...skipping 23 matching lines...) Expand all Loading... |
399 event->setTarget(this); | 399 event->setTarget(this); |
400 eventQueue->enqueueEvent(event); | 400 eventQueue->enqueueEvent(event); |
401 } | 401 } |
402 | 402 |
403 blink::WebIDBDatabase* IDBTransaction::backendDB() const | 403 blink::WebIDBDatabase* IDBTransaction::backendDB() const |
404 { | 404 { |
405 return m_database->backend(); | 405 return m_database->backend(); |
406 } | 406 } |
407 | 407 |
408 } // namespace WebCore | 408 } // namespace WebCore |
OLD | NEW |