diff options
author | tc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-26 20:27:29 +0000 |
---|---|---|
committer | tc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-26 20:27:29 +0000 |
commit | 569b02299d0ad14b41625a01c82270184b739e1e (patch) | |
tree | a4d344340708c552314b2deebf5a166bc200e0fa | |
parent | 852ffb87540fbe805b64f3932641bd991d9c2bf9 (diff) | |
download | chromium_src-569b02299d0ad14b41625a01c82270184b739e1e.zip chromium_src-569b02299d0ad14b41625a01c82270184b739e1e.tar.gz chromium_src-569b02299d0ad14b41625a01c82270184b739e1e.tar.bz2 |
Fix 2 memory leaks in UtilityProcessHostTest.ExtensionUnpacker.
Valgrind says this test is now clean, let's hope purify agrees.
BUG=15456
Review URL: http://codereview.chromium.org/149092
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19410 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/utility_process_host_unittest.cc | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/chrome/browser/utility_process_host_unittest.cc b/chrome/browser/utility_process_host_unittest.cc index b48d95a..b813cb5 100644 --- a/chrome/browser/utility_process_host_unittest.cc +++ b/chrome/browser/utility_process_host_unittest.cc @@ -69,8 +69,9 @@ class TestUtilityProcessHostClient : public UtilityProcessHost::Client { class TestUtilityProcessHost : public UtilityProcessHost { public: TestUtilityProcessHost(TestUtilityProcessHostClient* client, - MessageLoop* loop_io) - : UtilityProcessHost(new ResourceDispatcherHost(NULL), client, loop_io) { + MessageLoop* loop_io, + ResourceDispatcherHost* rdh) + : UtilityProcessHost(rdh, client, loop_io) { } protected: @@ -104,9 +105,9 @@ TEST_F(UtilityProcessHostTest, ExtensionUnpacker) { scoped_refptr<TestUtilityProcessHostClient> client( new TestUtilityProcessHostClient(&message_loop_)); - TestUtilityProcessHost* process_host = new TestUtilityProcessHost( - client.get(), &message_loop_); - process_host->StartExtensionUnpacker( + ResourceDispatcherHost rdh(NULL); + TestUtilityProcessHost process_host(client.get(), &message_loop_, &rdh); + process_host.StartExtensionUnpacker( temp_extension_dir.AppendASCII("theme.crx")); message_loop_.Run(); EXPECT_TRUE(client->success()); |