From ee5c8726f8f7efbfe69315ef4585c4caf8b8e409 Mon Sep 17 00:00:00 2001 From: "alecflett@chromium.org" Date: Fri, 1 Feb 2013 00:26:25 +0000 Subject: Revert 179967 > Avoid leaking TestWebIDBFactory instances, and reset > the TestWebIDBFactory instance between layout tests. > > (The last part depends on a WebKit patch to actually > call ResetTestEnvironment.) > > R=jsbell@chromium.org > > Review URL: https://chromiumcodereview.appspot.com/12093086 TBR=darin@chromium.org Review URL: https://codereview.chromium.org/12090108 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@180017 0039d316-1c4b-4281-b951-d872f2087c98 --- webkit/support/test_webkit_platform_support.cc | 8 +------- webkit/support/test_webkit_platform_support.h | 3 --- webkit/support/webkit_support.cc | 4 +--- 3 files changed, 2 insertions(+), 13 deletions(-) (limited to 'webkit') diff --git a/webkit/support/test_webkit_platform_support.cc b/webkit/support/test_webkit_platform_support.cc index 291260d..a6cf5a9 100644 --- a/webkit/support/test_webkit_platform_support.cc +++ b/webkit/support/test_webkit_platform_support.cc @@ -405,9 +405,7 @@ class TestWebIDBFactory : public WebKit::WebIDBFactory { }; WebKit::WebIDBFactory* TestWebKitPlatformSupport::idbFactory() { - if (!idb_factory_) - idb_factory_.reset(new TestWebIDBFactory()); - return idb_factory_.get(); + return new TestWebIDBFactory(); } #if defined(OS_WIN) || defined(OS_MACOSX) @@ -613,7 +611,3 @@ WebKit::WebGestureCurve* TestWebKitPlatformSupport::createFlingAnimationCurve( // Caller will retain and release. return new WebGestureCurveMock(velocity, cumulative_scroll); } - -void TestWebKitPlatformSupport::ResetIDBFactory() { - idb_factory_.reset(); -} diff --git a/webkit/support/test_webkit_platform_support.h b/webkit/support/test_webkit_platform_support.h index a004ce0..6e2dc6e 100644 --- a/webkit/support/test_webkit_platform_support.h +++ b/webkit/support/test_webkit_platform_support.h @@ -137,8 +137,6 @@ class TestWebKitPlatformSupport : const WebKit::WebFloatPoint& velocity, const WebKit::WebSize& cumulative_scroll); - void ResetIDBFactory(); - private: TestShellWebMimeRegistryImpl mime_registry_; MockWebClipboardImpl mock_clipboard_; @@ -156,7 +154,6 @@ class TestWebKitPlatformSupport : WebKit::WebGamepads gamepad_data_; WebKit::Platform* shadow_platform_delegate_; HyphenDict* hyphen_dictionary_; - scoped_ptr idb_factory_; #if defined(OS_WIN) || defined(OS_MACOSX) WebKit::WebThemeEngine* active_theme_engine_; diff --git a/webkit/support/webkit_support.cc b/webkit/support/webkit_support.cc index 32c576f..9e376272 100644 --- a/webkit/support/webkit_support.cc +++ b/webkit/support/webkit_support.cc @@ -192,9 +192,7 @@ class TestEnvironment { #if defined(OS_ANDROID) media_player_manager_->ReleaseMediaResources(); #endif - webkit_platform_support_->ResetIDBFactory(); - // TODO(darin): Uncomment this once DRT calls ResetTestEnvironment(). - //WebKit::setIDBFactory(webkit_platform_support_->idbFactory()); + WebKit::setIDBFactory(webkit_platform_support_->idbFactory()); } TestWebKitPlatformSupport* webkit_platform_support() const { -- cgit v1.1