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

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

Issue 218953002: Oilpan: IDBCursor should be detached from IDBRequest when the IDBRequest stops (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
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 351 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 } 362 }
363 363
364 bool IDBRequest::hasPendingActivity() const 364 bool IDBRequest::hasPendingActivity() const
365 { 365 {
366 // FIXME: In an ideal world, we should return true as long as anyone has a o r can 366 // FIXME: In an ideal world, we should return true as long as anyone has a o r can
367 // get a handle to us and we have event listeners. This is order to h andle 367 // get a handle to us and we have event listeners. This is order to h andle
368 // user generated events properly. 368 // user generated events properly.
369 return m_hasPendingActivity && !m_contextStopped; 369 return m_hasPendingActivity && !m_contextStopped;
370 } 370 }
371 371
372 void IDBRequest::contextWillBeDestroyed()
373 {
374 checkForReferenceCycle();
haraken 2014/04/01 05:56:14 I need to reconsider what I should do here. Curren
Mads Ager (chromium) 2014/04/01 11:38:38 What we want to ensure in this call is that any cu
375 }
376
372 void IDBRequest::stop() 377 void IDBRequest::stop()
373 { 378 {
374 if (m_contextStopped) 379 if (m_contextStopped)
375 return; 380 return;
376 381
377 m_contextStopped = true; 382 m_contextStopped = true;
378 m_requestState.clear(); 383 m_requestState.clear();
379 384
380 RefPtr<IDBRequest> protect(this); 385 RefPtr<IDBRequest> protect(this);
381 386
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
521 526
522 void IDBRequest::dequeueEvent(Event* event) 527 void IDBRequest::dequeueEvent(Event* event)
523 { 528 {
524 for (size_t i = 0; i < m_enqueuedEvents.size(); ++i) { 529 for (size_t i = 0; i < m_enqueuedEvents.size(); ++i) {
525 if (m_enqueuedEvents[i].get() == event) 530 if (m_enqueuedEvents[i].get() == event)
526 m_enqueuedEvents.remove(i); 531 m_enqueuedEvents.remove(i);
527 } 532 }
528 } 533 }
529 534
530 } // namespace WebCore 535 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698