diff options
author | jochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-08 08:17:54 +0000 |
---|---|---|
committer | jochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-08 08:17:54 +0000 |
commit | 1d19ab9b46738559add4d893cd05ab149d6c155e (patch) | |
tree | a09ee0a2f529ea8b299f7e5bde3328a3f50c3cb8 /chrome/browser/task_manager | |
parent | 348dd6eb7cc0ff4cd3bee5694a9e8354cfde9859 (diff) | |
download | chromium_src-1d19ab9b46738559add4d893cd05ab149d6c155e.zip chromium_src-1d19ab9b46738559add4d893cd05ab149d6c155e.tar.gz chromium_src-1d19ab9b46738559add4d893cd05ab149d6c155e.tar.bz2 |
Revert 178551
> Add debug code to figure out where we forget to delete TaskManagerRendererResources
>
> BUG=165138
>
> Review URL: https://codereview.chromium.org/11953049
TBR=jochen@chromium.org
Review URL: https://codereview.chromium.org/12220072
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@181458 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/task_manager')
-rw-r--r-- | chrome/browser/task_manager/task_manager_resource_providers.cc | 21 | ||||
-rw-r--r-- | chrome/browser/task_manager/task_manager_resource_providers.h | 13 |
2 files changed, 2 insertions, 32 deletions
diff --git a/chrome/browser/task_manager/task_manager_resource_providers.cc b/chrome/browser/task_manager/task_manager_resource_providers.cc index cdc514f..8b9022f 100644 --- a/chrome/browser/task_manager/task_manager_resource_providers.cc +++ b/chrome/browser/task_manager/task_manager_resource_providers.cc @@ -9,7 +9,6 @@ #include "base/basictypes.h" #include "base/bind.h" #include "base/command_line.h" -#include "base/debug/alias.h" #include "base/file_version_info.h" #include "base/i18n/rtl.h" #include "base/memory/scoped_ptr.h" @@ -183,8 +182,7 @@ bool IsContentsBackgroundPrinted(WebContents* web_contents) { //////////////////////////////////////////////////////////////////////////////// TaskManagerRendererResource::TaskManagerRendererResource( base::ProcessHandle process, content::RenderViewHost* render_view_host) - : content::RenderViewHostObserver(render_view_host), - process_(process), + : process_(process), render_view_host_(render_view_host), pending_stats_update_(false), fps_(0.0f), @@ -203,18 +201,6 @@ TaskManagerRendererResource::~TaskManagerRendererResource() { } void TaskManagerRendererResource::Refresh() { - if (!render_view_host()) { - // Store information about where this TaskManagerRendererResource was - // created and where the RenderViewHost was destroyed on the stack to help - // debugging where we forgot to delete this resource. - base::debug::StackTrace creation_stack = creation_stack_; - base::debug::Alias(&creation_stack); - CHECK(destruction_stack_); - base::debug::StackTrace destruction_stack = *destruction_stack_; - base::debug::Alias(&destruction_stack); - CHECK(false); - } - if (!pending_stats_update_) { render_view_host_->Send(new ChromeViewMsg_GetCacheResourceStats); pending_stats_update_ = true; @@ -305,11 +291,6 @@ bool TaskManagerRendererResource::SupportNetworkUsage() const { return true; } -void TaskManagerRendererResource::RenderViewHostDestroyed( - content::RenderViewHost* render_view_host) { - destruction_stack_.reset(new base::debug::StackTrace()); -} - //////////////////////////////////////////////////////////////////////////////// // TaskManagerTabContentsResource class //////////////////////////////////////////////////////////////////////////////// diff --git a/chrome/browser/task_manager/task_manager_resource_providers.h b/chrome/browser/task_manager/task_manager_resource_providers.h index e3bb5ba..81d9cdd 100644 --- a/chrome/browser/task_manager/task_manager_resource_providers.h +++ b/chrome/browser/task_manager/task_manager_resource_providers.h @@ -10,13 +10,11 @@ #include "base/basictypes.h" #include "base/compiler_specific.h" -#include "base/debug/stack_trace.h" #include "base/process_util.h" #include "chrome/browser/task_manager/task_manager.h" #include "content/public/browser/child_process_data.h" #include "content/public/browser/notification_observer.h" #include "content/public/browser/notification_registrar.h" -#include "content/public/browser/render_view_host_observer.h" #include "content/public/common/process_type.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebCache.h" @@ -38,8 +36,7 @@ class Extension; // Base class for various types of render process resources that provides common // functionality like stats tracking. -class TaskManagerRendererResource : public TaskManager::Resource, - public content::RenderViewHostObserver { +class TaskManagerRendererResource : public TaskManager::Resource { public: TaskManagerRendererResource(base::ProcessHandle process, content::RenderViewHost* render_view_host); @@ -78,10 +75,6 @@ class TaskManagerRendererResource : public TaskManager::Resource, virtual void NotifyV8HeapStats(size_t v8_memory_allocated, size_t v8_memory_used) OVERRIDE; - // content::RenderViewHostObserver implementation. - virtual void RenderViewHostDestroyed( - content::RenderViewHost* render_view_host) OVERRIDE; - content::RenderViewHost* render_view_host() const { return render_view_host_; } @@ -109,10 +102,6 @@ class TaskManagerRendererResource : public TaskManager::Resource, size_t v8_memory_used_; bool pending_v8_memory_allocated_update_; - // TODO(jochen): Remove asap after debugging http://crbug.com/165138. - base::debug::StackTrace creation_stack_; - scoped_ptr<base::debug::StackTrace> destruction_stack_; - DISALLOW_COPY_AND_ASSIGN(TaskManagerRendererResource); }; |