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

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

Issue 316443004: Oilpan: Remove ref counting from EventTarget and all uses of Pass/RefPtr<EventTarget>. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 6 years, 6 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/IDBRequest.cpp ('k') | Source/modules/webaudio/AudioNode.h » ('j') | 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 344 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « Source/modules/indexeddb/IDBRequest.cpp ('k') | Source/modules/webaudio/AudioNode.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698