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

Unified Diff: content/public/test/render_view_test.cc

Issue 137023014: Added ScopedNSAutoreleasePool to RenderViewTest. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Moved autorelease pool to RenderViewTest Created 6 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: content/public/test/render_view_test.cc
diff --git a/content/public/test/render_view_test.cc b/content/public/test/render_view_test.cc
index c416114fe148b45d243413b4dfb2d3d19c19c837..aef433792e759a3ae6cddbc1ab2badfc379875ee 100644
--- a/content/public/test/render_view_test.cc
+++ b/content/public/test/render_view_test.cc
@@ -28,6 +28,10 @@
#include "ui/base/resource/resource_bundle.h"
#include "v8/include/v8.h"
+#if defined(OS_MACOSX)
+#include "base/mac/scoped_nsautorelease_pool.h"
+#endif
+
using blink::WebFrame;
using blink::WebInputEvent;
using blink::WebMouseEvent;
@@ -143,6 +147,9 @@ void RenderViewTest::SetUp() {
render_thread_->set_new_window_routing_id(kNewWindowRouteId);
render_thread_->set_new_frame_routing_id(kNewFrameRouteId);
+#if defined(OS_MACOSX)
+ autorelease_pool_.reset(new base::mac::ScopedNSAutoreleasePool());
+#endif
command_line_.reset(new CommandLine(CommandLine::NO_PROGRAM));
params_.reset(new MainFunctionParams(*command_line_));
platform_.reset(new RendererMainPlatformDelegate(*params_));
@@ -210,6 +217,10 @@ void RenderViewTest::TearDown() {
// (http://crbug.com/21508).
base::RunLoop().RunUntilIdle();
+#if defined(OS_MACOSX)
+ autorelease_pool_.reset(NULL);
Nico 2014/02/04 16:12:51 Is this necessary? The destructor will run this au
tasak 2014/02/05 04:23:02 Yes. This should be done before blink::shutdown().
Nico 2014/02/05 04:58:22 Cool. Say "// Needs to run before blink::shutdown(
tasak 2014/02/05 05:16:02 Sure. Done.
+#endif
+
blink::shutdown();
platform_->PlatformUninitialize();
« content/public/test/render_view_test.h ('K') | « content/public/test/render_view_test.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698