summaryrefslogtreecommitdiffstats
path: root/content/common/indexed_db/indexed_db_dispatcher.h
diff options
context:
space:
mode:
authordgrogan@chromium.org <dgrogan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-13 02:16:08 +0000
committerdgrogan@chromium.org <dgrogan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-13 02:16:08 +0000
commita9bbd0eec792cb7d604b3fe221583b21550394c8 (patch)
tree51aebbf2ba72019ee0c43fd054089c0c4cba69d2 /content/common/indexed_db/indexed_db_dispatcher.h
parentd75c0f0c65a0bfc0d14885a8de47cda2e8f265b8 (diff)
downloadchromium_src-a9bbd0eec792cb7d604b3fe221583b21550394c8.zip
chromium_src-a9bbd0eec792cb7d604b3fe221583b21550394c8.tar.gz
chromium_src-a9bbd0eec792cb7d604b3fe221583b21550394c8.tar.bz2
Add DCHECK in IndexedDBDispatcher::ThreadSpecificInstance to ensure
IndexedDBDispatcher doesn't get re-created during worker shutdown. This could happen if there are IDB objects that survive the call to didStopWorkerRunLoop. This CL also makes RenderThreadImpl call new IndexedDBDispatcher instead of IndexedDBDispatcher::ThreadSpecificInstance to avoid hitting that DCHECK in tests. WebRTCAudioDeviceTest creates a RenderThreadImpl object, deletes it, and creates another render thread object, all on the same thread. BUG=121734 TEST= Review URL: http://codereview.chromium.org/10052005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@132128 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/common/indexed_db/indexed_db_dispatcher.h')
-rw-r--r--content/common/indexed_db/indexed_db_dispatcher.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/content/common/indexed_db/indexed_db_dispatcher.h b/content/common/indexed_db/indexed_db_dispatcher.h
index f48e7c2..761c035 100644
--- a/content/common/indexed_db/indexed_db_dispatcher.h
+++ b/content/common/indexed_db/indexed_db_dispatcher.h
@@ -49,6 +49,11 @@ CONTENT_EXPORT extern const size_t kMaxIDBValueSizeInBytes;
class CONTENT_EXPORT IndexedDBDispatcher
: public webkit_glue::WorkerTaskRunner::Observer {
public:
+ // Constructor made public to allow RenderThreadImpl to own a copy without
+ // failing a NOTREACHED in ThreadSpecificInstance in tests that instantiate
+ // two copies of RenderThreadImpl on the same thread. Everyone else probably
+ // wants to use ThreadSpecificInstance().
+ IndexedDBDispatcher();
virtual ~IndexedDBDispatcher();
static IndexedDBDispatcher* ThreadSpecificInstance();
@@ -209,7 +214,6 @@ class CONTENT_EXPORT IndexedDBDispatcher
private:
FRIEND_TEST_ALL_PREFIXES(IndexedDBDispatcherTest, ValueSizeTest);
- IndexedDBDispatcher();
// IDBCallback message handlers.
void OnSuccessNull(int32 response_id);
void OnSuccessIDBDatabase(int32 thread_id,