Commit 9361390b authored by gab's avatar gab Committed by Commit bot

Fix TestBrowserThreadBundle destruction order in IndexedDBDatabaseOperationTest.

IndexedDBDatabase requires BrowserThread::IO to be alive when it is
destroyed or it leaks some of its DeleteOnIOThread scoped_refptr members.
Not doing so results in LSAN failures in
https://codereview.chromium.org/2464233002 per it tightening
TestBrowserThread's shutdown semantics.

BUG=653916

Review-Url: https://codereview.chromium.org/2566693004
Cr-Commit-Position: refs/heads/master@{#437899}
parent 1cd35eca
...@@ -377,6 +377,10 @@ class IndexedDBDatabaseOperationTest : public testing::Test { ...@@ -377,6 +377,10 @@ class IndexedDBDatabaseOperationTest : public testing::Test {
void RunPostedTasks() { base::RunLoop().RunUntilIdle(); } void RunPostedTasks() { base::RunLoop().RunUntilIdle(); }
private:
// Needs to outlive |db_|.
content::TestBrowserThreadBundle thread_bundle_;
protected: protected:
scoped_refptr<IndexedDBFakeBackingStore> backing_store_; scoped_refptr<IndexedDBFakeBackingStore> backing_store_;
scoped_refptr<IndexedDBDatabase> db_; scoped_refptr<IndexedDBDatabase> db_;
...@@ -389,7 +393,6 @@ class IndexedDBDatabaseOperationTest : public testing::Test { ...@@ -389,7 +393,6 @@ class IndexedDBDatabaseOperationTest : public testing::Test {
private: private:
scoped_refptr<MockIndexedDBFactory> factory_; scoped_refptr<MockIndexedDBFactory> factory_;
content::TestBrowserThreadBundle thread_bundle_;
DISALLOW_COPY_AND_ASSIGN(IndexedDBDatabaseOperationTest); DISALLOW_COPY_AND_ASSIGN(IndexedDBDatabaseOperationTest);
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment