summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoroshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-09-10 20:47:10 +0000
committeroshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-09-10 20:47:10 +0000
commitb31dbaf51d30c2a37db28874e60724d66050eb97 (patch)
tree85c05248963ccac50b0c3a84e2e0e723fa0bbbde
parentbaca781783aa72fb63d9bb621a26fbaba025a4ef (diff)
downloadchromium_src-b31dbaf51d30c2a37db28874e60724d66050eb97.zip
chromium_src-b31dbaf51d30c2a37db28874e60724d66050eb97.tar.gz
chromium_src-b31dbaf51d30c2a37db28874e60724d66050eb97.tar.bz2
Fix leaks in ash_unittests
also suppressed leaks in non chrome component plus a couple of cleanups (eliminated unused code/variables) BUG=144990,146947 TEST=valgrind reports no leak on ash_unittests Review URL: https://chromiumcodereview.appspot.com/10907101 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@155819 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--ash/desktop_background/desktop_background_view.cc22
-rw-r--r--ash/drag_drop/drag_drop_tracker_unittest.cc2
-rw-r--r--ash/screensaver/screensaver_view_unittest.cc5
-rw-r--r--ash/test/test_shell_delegate.cc3
-rw-r--r--ash/test/test_shell_delegate.h2
-rw-r--r--ash/wm/system_gesture_event_filter_unittest.cc91
-rw-r--r--ash/wm/window_animations.cc4
-rw-r--r--ash/wm/window_manager_unittest.cc7
-rw-r--r--ash/wm/workspace/multi_window_resize_controller.cc18
-rw-r--r--ash/wm/workspace/multi_window_resize_controller.h2
-rw-r--r--ash/wm/workspace/multi_window_resize_controller_unittest.cc4
-rw-r--r--tools/heapcheck/suppressions.txt24
-rw-r--r--tools/valgrind/memcheck/suppressions.txt30
13 files changed, 132 insertions, 82 deletions
diff --git a/ash/desktop_background/desktop_background_view.cc b/ash/desktop_background/desktop_background_view.cc
index a3d01c8..7369304 100644
--- a/ash/desktop_background/desktop_background_view.cc
+++ b/ash/desktop_background/desktop_background_view.cc
@@ -64,17 +64,19 @@ class DesktopBackgroundViewCleanup : public views::WidgetDelegate {
DISALLOW_COPY_AND_ASSIGN(DesktopBackgroundViewCleanup);
};
-class ShowWallpaperAnimationObserver : public ui::ImplicitAnimationObserver {
+class ShowWallpaperAnimationObserver : public ui::ImplicitAnimationObserver,
+ public aura::WindowObserver {
public:
ShowWallpaperAnimationObserver(aura::RootWindow* root_window,
- int container_id,
views::Widget* desktop_widget)
: root_window_(root_window),
- container_id_(container_id),
desktop_widget_(desktop_widget) {
+ desktop_widget_->GetNativeView()->AddObserver(this);
}
virtual ~ShowWallpaperAnimationObserver() {
+ if (desktop_widget_)
+ desktop_widget_->GetNativeView()->RemoveObserver(this);
}
private:
@@ -90,12 +92,17 @@ class ShowWallpaperAnimationObserver : public ui::ImplicitAnimationObserver {
root_window_->GetProperty(kComponentWrapper)->GetComponent(true);
root_window_->SetProperty(kWindowDesktopComponent, component);
}
+ desktop_widget_->GetNativeView()->RemoveObserver(this);
+ delete this;
+ }
- MessageLoop::current()->DeleteSoon(FROM_HERE, this);
+ // Overridden from aura::WindowObserver:
+ virtual void OnWindowDestroying(aura::Window* window) OVERRIDE {
+ DCHECK_EQ(desktop_widget_->GetNativeView(), window);
+ desktop_widget_->GetNativeView()->layer()->GetAnimator()->StopAnimating();
}
aura::RootWindow* root_window_;
- int container_id_;
views::Widget* desktop_widget_;
DISALLOW_COPY_AND_ASSIGN(ShowWallpaperAnimationObserver);
@@ -189,14 +196,12 @@ views::Widget* CreateDesktopBackground(aura::RootWindow* root_window,
new DesktopBackgroundViewCleanup(desktop_widget, root_window);
views::Widget::InitParams params(
views::Widget::InitParams::TYPE_WINDOW_FRAMELESS);
- DesktopBackgroundView* view = new DesktopBackgroundView();
- params.delegate = view;
if (controller->GetWallpaper().isNull())
params.transparent = true;
params.delegate = cleanup;
params.parent = root_window->GetChildById(container_id);
desktop_widget->Init(params);
- desktop_widget->SetContentsView(view);
+ desktop_widget->SetContentsView(new DesktopBackgroundView());
ash::WindowVisibilityAnimationType animation_type =
ash::Shell::GetInstance()->user_wallpaper_delegate()->GetAnimationType();
ash::SetWindowVisibilityAnimationType(desktop_widget->GetNativeView(),
@@ -217,7 +222,6 @@ views::Widget* CreateDesktopBackground(aura::RootWindow* root_window,
desktop_widget->GetNativeView()->layer()->GetAnimator());
settings.SetPreemptionStrategy(ui::LayerAnimator::ENQUEUE_NEW_ANIMATION);
settings.AddObserver(new ShowWallpaperAnimationObserver(root_window,
- container_id,
desktop_widget));
desktop_widget->Show();
desktop_widget->GetNativeView()->SetName("DesktopBackgroundView");
diff --git a/ash/drag_drop/drag_drop_tracker_unittest.cc b/ash/drag_drop/drag_drop_tracker_unittest.cc
index 6ec3f3a..bec790c 100644
--- a/ash/drag_drop/drag_drop_tracker_unittest.cc
+++ b/ash/drag_drop/drag_drop_tracker_unittest.cc
@@ -26,7 +26,7 @@ class DragDropTrackerTest : public test::AshTestBase {
aura::Window* parent) {
static int window_id = 0;
return aura::test::CreateTestWindowWithDelegate(
- new aura::test::TestWindowDelegate,
+ aura::test::TestWindowDelegate::CreateSelfDestroyingDelegate(),
window_id++,
bounds,
parent);
diff --git a/ash/screensaver/screensaver_view_unittest.cc b/ash/screensaver/screensaver_view_unittest.cc
index 55789e1..86e7fc9 100644
--- a/ash/screensaver/screensaver_view_unittest.cc
+++ b/ash/screensaver/screensaver_view_unittest.cc
@@ -28,11 +28,6 @@ class ScreensaverViewTest : public ash::test::AshTestBase {
RunAllPendingInMessageLoop();
}
- virtual void TearDown() OVERRIDE {
- RunAllPendingInMessageLoop();
- AshTestBase::TearDown();
- }
-
void ExpectOpenScreensaver() {
internal::ScreensaverView* screensaver =
internal::ScreensaverView::GetInstance();
diff --git a/ash/test/test_shell_delegate.cc b/ash/test/test_shell_delegate.cc
index 36e61e8..9496ccf 100644
--- a/ash/test/test_shell_delegate.cc
+++ b/ash/test/test_shell_delegate.cc
@@ -80,7 +80,8 @@ void TestShellDelegate::ShowTaskManager() {
}
content::BrowserContext* TestShellDelegate::GetCurrentBrowserContext() {
- return new content::TestBrowserContext();
+ current_browser_context_.reset(new content::TestBrowserContext());
+ return current_browser_context_.get();
}
void TestShellDelegate::ToggleSpokenFeedback() {
diff --git a/ash/test/test_shell_delegate.h b/ash/test/test_shell_delegate.h
index e464d8f..76e80bb 100644
--- a/ash/test/test_shell_delegate.h
+++ b/ash/test/test_shell_delegate.h
@@ -7,6 +7,7 @@
#include "ash/shell_delegate.h"
#include "base/compiler_specific.h"
+#include "base/memory/scoped_ptr.h"
namespace ash {
namespace test {
@@ -53,6 +54,7 @@ class TestShellDelegate : public ShellDelegate {
private:
bool locked_;
bool spoken_feedback_enabled_;
+ scoped_ptr<content::BrowserContext> current_browser_context_;
DISALLOW_COPY_AND_ASSIGN(TestShellDelegate);
};
diff --git a/ash/wm/system_gesture_event_filter_unittest.cc b/ash/wm/system_gesture_event_filter_unittest.cc
index 5c6a2bc..5a84f60 100644
--- a/ash/wm/system_gesture_event_filter_unittest.cc
+++ b/ash/wm/system_gesture_event_filter_unittest.cc
@@ -119,6 +119,7 @@ class ResizableWidgetDelegate : public views::WidgetDelegateView {
private:
virtual bool CanResize() const OVERRIDE { return true; }
+ virtual void DeleteDelegate() OVERRIDE { delete this; }
DISALLOW_COPY_AND_ASSIGN(ResizableWidgetDelegate);
};
@@ -188,9 +189,9 @@ TEST_F(SystemGestureEventFilterTest, TapOutsideRootWindow) {
base::Time::NowFromSystemTime() - base::Time());
root_window->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
- ui::GestureEvent* event = CreateGesture(
- ui::ET_GESTURE_TAP, 0, 0, 0, 0, kTouchId);
- bool consumed = root_window->DispatchGestureEvent(event);
+ scoped_ptr<ui::GestureEvent> event(CreateGesture(
+ ui::ET_GESTURE_TAP, 0, 0, 0, 0, kTouchId));
+ bool consumed = root_window->DispatchGestureEvent(event.get());
EXPECT_TRUE(consumed);
@@ -199,9 +200,9 @@ TEST_F(SystemGestureEventFilterTest, TapOutsideRootWindow) {
Shell::GetInstance()->RemoveEnvEventFilter(
shell_test.system_gesture_event_filter());
- ui::GestureEvent* event2 = CreateGesture(
- ui::ET_GESTURE_TAP, 0, 0, 0, 0, kTouchId);
- consumed = root_window->DispatchGestureEvent(event2);
+ scoped_ptr<ui::GestureEvent> event2(CreateGesture(
+ ui::ET_GESTURE_TAP, 0, 0, 0, 0, kTouchId));
+ consumed = root_window->DispatchGestureEvent(event2.get());
// The event filter doesn't exist, so the touch won't be consumed.
EXPECT_FALSE(consumed);
@@ -228,32 +229,32 @@ void MoveToDeviceControlBezelStartPosition(
// Position the initial touch down slightly underneath the position of
// interest to avoid a conflict with the noise filter.
- ui::GestureEvent* event1 = CreateGesture(
+ scoped_ptr<ui::GestureEvent> event1(CreateGesture(
ui::ET_GESTURE_SCROLL_BEGIN, xpos, ypos + ypos_half - 10,
- 0, 0, touch_id);
- bool consumed = root_window->DispatchGestureEvent(event1);
+ 0, 0, touch_id));
+ bool consumed = root_window->DispatchGestureEvent(event1.get());
EXPECT_TRUE(consumed);
EXPECT_EQ(initial_count, delegate->handle_percent_count());
// No move at the beginning will produce no events.
- ui::GestureEvent* event2 = CreateGesture(
+ scoped_ptr<ui::GestureEvent> event2(CreateGesture(
ui::ET_GESTURE_SCROLL_UPDATE,
- xpos, ypos + ypos_half - 10, 0, 0, touch_id);
- consumed = root_window->DispatchGestureEvent(event2);
+ xpos, ypos + ypos_half - 10, 0, 0, touch_id));
+ consumed = root_window->DispatchGestureEvent(event2.get());
EXPECT_TRUE(consumed);
EXPECT_EQ(initial_count, delegate->handle_percent_count());
// A move to a new Y location will produce an event.
- ui::GestureEvent* event3 = CreateGesture(
+ scoped_ptr<ui::GestureEvent> event3(CreateGesture(
ui::ET_GESTURE_SCROLL_UPDATE, xpos, ypos + ypos_half,
- 0, 10, touch_id);
+ 0, 10, touch_id));
int count = initial_count;
int loop_counter = 0;
while (count == initial_count && loop_counter++ < 100) {
- EXPECT_TRUE(root_window->DispatchGestureEvent(event3));
+ EXPECT_TRUE(root_window->DispatchGestureEvent(event3.get()));
count = delegate->handle_percent_count();
}
EXPECT_TRUE(loop_counter && loop_counter < 100);
@@ -303,41 +304,41 @@ TEST_F(SystemGestureEventFilterTest, DeviceControl) {
root_window, delegate, value, xpos, ypos, ypos_half, kTouchId);
// A move towards the screen is fine as long as we do not go inside it.
- ui::GestureEvent* event4 = CreateGesture(
+ scoped_ptr<ui::GestureEvent> event4(CreateGesture(
ui::ET_GESTURE_SCROLL_UPDATE,
xpos + invalid_xpos_direction,
ypos + ypos_half,
- invalid_xpos_direction, 0, kTouchId);
- bool consumed = root_window->DispatchGestureEvent(event4);
+ invalid_xpos_direction, 0, kTouchId));
+ bool consumed = root_window->DispatchGestureEvent(event4.get());
EXPECT_TRUE(consumed);
EXPECT_EQ(2, delegate->handle_percent_count());
// A move into the screen will cancel the gesture.
- ui::GestureEvent* event5 = CreateGesture(
+ scoped_ptr<ui::GestureEvent> event5(CreateGesture(
ui::ET_GESTURE_SCROLL_UPDATE,
xpos + 20 * invalid_xpos_direction,
ypos + ypos_half,
- 20 * invalid_xpos_direction, 0, kTouchId);
- consumed = root_window->DispatchGestureEvent(event5);
+ 20 * invalid_xpos_direction, 0, kTouchId));
+ consumed = root_window->DispatchGestureEvent(event5.get());
EXPECT_TRUE(consumed);
EXPECT_EQ(2, delegate->handle_percent_count());
// Finishing the gesture should not change anything.
- ui::GestureEvent* event6 = CreateGesture(
+ scoped_ptr<ui::GestureEvent> event6(CreateGesture(
ui::ET_GESTURE_SCROLL_END, xpos, ypos + ypos_half,
- 0, 0, kTouchId);
- consumed = root_window->DispatchGestureEvent(event6);
+ 0, 0, kTouchId));
+ consumed = root_window->DispatchGestureEvent(event6.get());
EXPECT_TRUE(consumed);
EXPECT_EQ(2, delegate->handle_percent_count());
// Another event after this one should get ignored.
- ui::GestureEvent* event7 = CreateGesture(
+ scoped_ptr<ui::GestureEvent> event7(CreateGesture(
ui::ET_GESTURE_SCROLL_UPDATE, xpos, ypos_half,
- 0, 0, kTouchId);
- consumed = root_window->DispatchGestureEvent(event7);
+ 0, 0, kTouchId));
+ consumed = root_window->DispatchGestureEvent(event7.get());
EXPECT_TRUE(consumed);
EXPECT_EQ(2, delegate->handle_percent_count());
@@ -352,10 +353,10 @@ TEST_F(SystemGestureEventFilterTest, DeviceControl) {
root_window, delegate, value, xpos, ypos, ypos_half, kTouchId);
// Note: The counter is with this call at 3.
- ui::GestureEvent* event8 = CreateGesture(
+ scoped_ptr<ui::GestureEvent> event8(CreateGesture(
ui::ET_GESTURE_SCROLL_UPDATE, xpos, ypos / 10,
- 0, ypos / 10 - ypos, kTouchId);
- consumed = root_window->DispatchGestureEvent(event8);
+ 0, ypos / 10 - ypos, kTouchId));
+ consumed = root_window->DispatchGestureEvent(event8.get());
EXPECT_TRUE(consumed);
EXPECT_EQ(3, delegate->handle_percent_count());
@@ -410,47 +411,47 @@ TEST_F(SystemGestureEventFilterTest, ApplicationControl) {
base::Time::NowFromSystemTime() - base::Time());
root_window->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
- ui::GestureEvent* event1 = CreateGesture(
+ scoped_ptr<ui::GestureEvent> event1(CreateGesture(
ui::ET_GESTURE_SCROLL_BEGIN, xpos, ypos,
- 0, 0, kTouchId);
- bool consumed = root_window->DispatchGestureEvent(event1);
+ 0, 0, kTouchId));
+ bool consumed = root_window->DispatchGestureEvent(event1.get());
EXPECT_TRUE(consumed);
EXPECT_EQ(ash::wm::GetActiveWindow(), active_window);
// No move at the beginning will produce no events.
- ui::GestureEvent* event2 = CreateGesture(
+ scoped_ptr<ui::GestureEvent> event2(CreateGesture(
ui::ET_GESTURE_SCROLL_UPDATE,
- xpos, ypos, 0, 0, kTouchId);
- consumed = root_window->DispatchGestureEvent(event2);
+ xpos, ypos, 0, 0, kTouchId));
+ consumed = root_window->DispatchGestureEvent(event2.get());
EXPECT_TRUE(consumed);
EXPECT_EQ(ash::wm::GetActiveWindow(), active_window);
// A move further to the outside will not trigger an action.
- ui::GestureEvent* event3 = CreateGesture(
+ scoped_ptr<ui::GestureEvent> event3(CreateGesture(
ui::ET_GESTURE_SCROLL_UPDATE, xpos - delta_x, ypos,
- -delta_x, 0, kTouchId);
- consumed = root_window->DispatchGestureEvent(event3);
+ -delta_x, 0, kTouchId));
+ consumed = root_window->DispatchGestureEvent(event3.get());
EXPECT_TRUE(consumed);
EXPECT_EQ(ash::wm::GetActiveWindow(), active_window);
// A move to the proper side will trigger an action.
- ui::GestureEvent* event4 = CreateGesture(
+ scoped_ptr<ui::GestureEvent> event4(CreateGesture(
ui::ET_GESTURE_SCROLL_UPDATE, xpos + delta_x, ypos,
- 2 * delta_x, 0, kTouchId);
- consumed = root_window->DispatchGestureEvent(event4);
+ 2 * delta_x, 0, kTouchId));
+ consumed = root_window->DispatchGestureEvent(event4.get());
EXPECT_TRUE(consumed);
EXPECT_NE(ash::wm::GetActiveWindow(), active_window);
active_window = ash::wm::GetActiveWindow();
// A second move to the proper side will not trigger an action.
- ui::GestureEvent* event5 = CreateGesture(
+ scoped_ptr<ui::GestureEvent> event5(CreateGesture(
ui::ET_GESTURE_SCROLL_UPDATE, xpos + 2 * delta_x, ypos,
- delta_x, 0, kTouchId);
- consumed = root_window->DispatchGestureEvent(event5);
+ delta_x, 0, kTouchId));
+ consumed = root_window->DispatchGestureEvent(event5.get());
EXPECT_TRUE(consumed);
EXPECT_EQ(ash::wm::GetActiveWindow(), active_window);
diff --git a/ash/wm/window_animations.cc b/ash/wm/window_animations.cc
index 8ea3d8d..98c98bc 100644
--- a/ash/wm/window_animations.cc
+++ b/ash/wm/window_animations.cc
@@ -154,7 +154,7 @@ class HidingWindowAnimationObserver : public ui::ImplicitAnimationObserver,
// Window may have been destroyed by this point.
if (window_)
window_->RemoveObserver(this);
- MessageLoop::current()->DeleteSoon(FROM_HERE, this);
+ delete this;
}
// Overridden from aura::WindowObserver:
@@ -169,7 +169,6 @@ class HidingWindowAnimationObserver : public ui::ImplicitAnimationObserver,
const views::Widget* const_widget = widget;
if (widget && const_widget->GetRootView() && widget->GetContentsView())
AcquireAllViewLayers(widget->GetContentsView());
-
window_->RemoveObserver(this);
window_ = NULL;
}
@@ -221,6 +220,7 @@ class WorkspaceHidingWindowAnimationObserver
// Restore the correct visibility value (overridden for the duration of the
// animation in AnimateHideWindow()).
layer_->SetVisible(false);
+ delete this;
}
ui::Layer* layer_;
diff --git a/ash/wm/window_manager_unittest.cc b/ash/wm/window_manager_unittest.cc
index 52d210a..777d9b9 100644
--- a/ash/wm/window_manager_unittest.cc
+++ b/ash/wm/window_manager_unittest.cc
@@ -150,11 +150,10 @@ TEST_F(WindowManagerTest, Focus) {
EXPECT_EQ(w12.get(), w12->GetFocusManager()->GetFocusedWindow());
// Set the focus to w123, but make the w1 not activatable.
- test::TestActivationDelegate* activation_delegate = new
- test::TestActivationDelegate(false);
+ test::TestActivationDelegate activation_delegate(false);
w123->Focus();
EXPECT_EQ(w123.get(), w12->GetFocusManager()->GetFocusedWindow());
- aura::client::SetActivationDelegate(w1.get(), activation_delegate);
+ aura::client::SetActivationDelegate(w1.get(), &activation_delegate);
// Hiding the focused window will set the focus to NULL because
// parent window is not focusable.
@@ -168,7 +167,7 @@ TEST_F(WindowManagerTest, Focus) {
w123->Show();
w123->Focus();
EXPECT_EQ(w123.get(), w12->GetFocusManager()->GetFocusedWindow());
- aura::client::SetActivationDelegate(w1.get(), activation_delegate);
+ aura::client::SetActivationDelegate(w1.get(), &activation_delegate);
// Removing the focused window will set the focus to NULL because
// parent window is not focusable.
diff --git a/ash/wm/workspace/multi_window_resize_controller.cc b/ash/wm/workspace/multi_window_resize_controller.cc
index cbeb5be..dbc7528 100644
--- a/ash/wm/workspace/multi_window_resize_controller.cc
+++ b/ash/wm/workspace/multi_window_resize_controller.cc
@@ -147,11 +147,11 @@ bool MultiWindowResizeController::ResizeWindows::Equals(
direction == other.direction;
}
-MultiWindowResizeController::MultiWindowResizeController()
- : resize_widget_(NULL){
+MultiWindowResizeController::MultiWindowResizeController() {
}
MultiWindowResizeController::~MultiWindowResizeController() {
+ window_resizer_.reset();
Hide();
}
@@ -162,7 +162,7 @@ void MultiWindowResizeController::Show(Window* window,
// only care about mouse movements from MouseWatcher. This is necessary as
// WorkspaceEventFilter only sees mouse movements over the windows, not all
// windows or over the desktop.
- if (resize_widget_)
+ if (resize_widget_.get())
return;
ResizeWindows windows(DetermineWindows(window, component, point_in_window));
@@ -194,15 +194,14 @@ void MultiWindowResizeController::Hide() {
return; // Ignore hides while actively resizing.
show_timer_.Stop();
- if (!resize_widget_)
+ if (!resize_widget_.get())
return;
windows_.window1->RemoveObserver(this);
windows_.window2->RemoveObserver(this);
for (size_t i = 0; i < windows_.other_windows.size(); ++i)
windows_.other_windows[i]->RemoveObserver(this);
mouse_watcher_.reset();
- resize_widget_->Close();
- resize_widget_ = NULL;
+ resize_widget_.reset();
windows_ = ResizeWindows();
}
@@ -351,10 +350,10 @@ void MultiWindowResizeController::DelayedHide() {
}
void MultiWindowResizeController::ShowNow() {
- DCHECK(!resize_widget_);
+ DCHECK(!resize_widget_.get());
DCHECK(windows_.is_valid());
show_timer_.Stop();
- resize_widget_ = new views::Widget;
+ resize_widget_.reset(new views::Widget);
views::Widget::InitParams params(views::Widget::InitParams::TYPE_POPUP);
params.transparent = true;
params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET;
@@ -363,7 +362,6 @@ void MultiWindowResizeController::ShowNow() {
internal::kShellWindowId_AlwaysOnTopContainer);
params.can_activate = false;
ResizeView* view = new ResizeView(this, windows_.direction);
- params.delegate = new views::WidgetDelegateView;
resize_widget_->set_focus_on_creation(false);
resize_widget_->Init(params);
SetWindowVisibilityAnimationType(
@@ -385,7 +383,7 @@ void MultiWindowResizeController::ShowNow() {
}
bool MultiWindowResizeController::IsShowing() const {
- return resize_widget_ || show_timer_.IsRunning();
+ return resize_widget_.get() || show_timer_.IsRunning();
}
void MultiWindowResizeController::StartResize(
diff --git a/ash/wm/workspace/multi_window_resize_controller.h b/ash/wm/workspace/multi_window_resize_controller.h
index ce2f381..19928d2 100644
--- a/ash/wm/workspace/multi_window_resize_controller.h
+++ b/ash/wm/workspace/multi_window_resize_controller.h
@@ -153,7 +153,7 @@ class ASH_EXPORT MultiWindowResizeController :
// Timer used before showing.
base::OneShotTimer<MultiWindowResizeController> show_timer_;
- views::Widget* resize_widget_;
+ scoped_ptr<views::Widget> resize_widget_;
// If non-null we're in a resize loop.
scoped_ptr<WorkspaceWindowResizer> window_resizer_;
diff --git a/ash/wm/workspace/multi_window_resize_controller_unittest.cc b/ash/wm/workspace/multi_window_resize_controller_unittest.cc
index c4aa585..ed16ec1 100644
--- a/ash/wm/workspace/multi_window_resize_controller_unittest.cc
+++ b/ash/wm/workspace/multi_window_resize_controller_unittest.cc
@@ -86,7 +86,9 @@ class MultiWindowResizeControllerTest : public test::AshTestBase {
return resize_controller_->IsOverWindows(loc);
}
- views::Widget* resize_widget() { return resize_controller_->resize_widget_; }
+ views::Widget* resize_widget() {
+ return resize_controller_->resize_widget_.get();
+ }
MultiWindowResizeController* resize_controller_;
diff --git a/tools/heapcheck/suppressions.txt b/tools/heapcheck/suppressions.txt
index a70a60e..e5822a3 100644
--- a/tools/heapcheck/suppressions.txt
+++ b/tools/heapcheck/suppressions.txt
@@ -1209,13 +1209,35 @@
fun:GetNumObjects
}
{
- bug_114750
+ bug_114750_a
Heapcheck:Leak
fun:::FindBestMatchFontFamilyName
fun:gfx::PlatformFontPango::PlatformFontPango
fun:PlatformFontPangoTest_FamilyList_Test::TestBody
}
{
+ bug_114750_b
+ Heapcheck:Leak
+ fun:??
+ fun:FindBestMatchFontFamilyName
+ fun:PlatformFontPango
+ fun:gfx::PlatformFont::CreateFromNativeFont
+ fun:Font
+ fun:PlatformFontPango
+ fun:gfx::PlatformFont::CreateDefault
+ fun:Font
+ fun:Label
+ fun:ash::internal::TrayItemView::CreateLabel
+ fun:ash::internal::TrayIME::CreateTrayView
+ fun:ash::SystemTray::AddTrayItem
+ fun:ash::SystemTray::CreateItems
+ fun:ash::SystemTray::Initialize
+ fun:ash::internal::StatusAreaWidget::CreateTrayViews
+ fun:ash::Shell::Init
+ fun:ash::Shell::CreateInstance
+ fun:ash::test::AshTestBase::SetUp
+}
+{
bug_114758
Heapcheck:Leak
...
diff --git a/tools/valgrind/memcheck/suppressions.txt b/tools/valgrind/memcheck/suppressions.txt
index ab5729c..8841fda 100644
--- a/tools/valgrind/memcheck/suppressions.txt
+++ b/tools/valgrind/memcheck/suppressions.txt
@@ -718,6 +718,23 @@
...
fun:_mesa_glsl_link_shader
}
+{
+ bug_146955
+ Memcheck:Unaddressable
+ ...
+ fun:FcConfigParseAndLoad
+ fun:FcInitLoadConfig
+ fun:FcInitLoadConfigAndFonts
+ fun:FcInit
+ fun:FcConfigGetCurrent
+ fun:FcConfigSubstituteWithPat
+ fun:_ZN12_GLOBAL__N_127FindBestMatchFontFamilyNameERKSt6vectorISsSaISsEE
+ fun:_ZN3gfx17PlatformFontPangoC1EP21_PangoFontDescription
+ fun:_ZN3gfx12PlatformFont20CreateFromNativeFontEP21_PangoFontDescription
+ fun:_ZN3gfx4FontC1EP21_PangoFontDescription
+ fun:_ZN3gfx17PlatformFontPangoC1Ev
+ fun:_ZN3gfx12PlatformFont13CreateDefaultEv
+}
#-----------------------------------------------------------------------
# 2. intentional unit test errors, or stuff that is somehow a false positive
@@ -5963,8 +5980,6 @@
fun:_ZN7WebCore9CSSParser10parseSheetEPNS_18StyleSheetContentsERKN3WTF6StringEiPNS3_6VectorINS3_6RefPtrINS_17CSSRuleSourceDataEEELm0EEE
}
-
-
#-----------------------------------------------------------------------
# 4. These only occur on our Google workstations
@@ -6004,3 +6019,14 @@
...
fun:_ZN4aura19RootWindowHostLinuxC1EPNS_22RootWindowHostDelegateERKN3gfx4RectE
}
+{
+ bug_146950
+ Memcheck:Leak
+ fun:malloc
+ fun:get_peer_sock_name
+ fun:_xcb_get_auth_info
+ fun:xcb_connect_to_display_with_auth_info
+ fun:_XConnectXCB
+ fun:XOpenDisplay
+ fun:_ZN4base18MessagePumpAuraX1118GetDefaultXDisplayEv
+}