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

Unified Diff: content/browser/renderer_host/render_widget_host_view_aura.cc

Issue 8418026: Fix possible memory leak due to tooltip property in aura::Window (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 2 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
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_aura.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_widget_host_view_aura.cc
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
index 0fc2348492cfdb8c0628f910470c983a63ce1d74..5feacd83da1096b833197a0d23ad3e6d12fe0e54 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -80,6 +80,7 @@ RenderWidgetHostViewAura::RenderWidgetHostViewAura(RenderWidgetHost* host)
ALLOW_THIS_IN_INITIALIZER_LIST(window_(new aura::Window(this))),
is_loading_(false) {
host_->SetView(this);
+ window_->SetProperty(aura::kTooltipTextKey, &tooltip_);
}
RenderWidgetHostViewAura::~RenderWidgetHostViewAura() {
@@ -220,8 +221,7 @@ void RenderWidgetHostViewAura::Destroy() {
}
void RenderWidgetHostViewAura::SetTooltipText(const string16& tooltip_text) {
- string16* tooltip = new string16(tooltip_text);
- window_->SetProperty(aura::kTooltipTextKey, tooltip);
+ tooltip_ = tooltip_text;
}
BackingStore* RenderWidgetHostViewAura::AllocBackingStore(
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_aura.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698