diff options
author | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-26 00:31:08 +0000 |
---|---|---|
committer | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-26 00:31:08 +0000 |
commit | 61a9b2d8a766f0eb9e790385939589797bac37f2 (patch) | |
tree | 5d96266683dc64fc6b37e6839f4ed909a9922db7 /chrome/renderer/render_thread.cc | |
parent | 00d721c144d35882dfaf24b3869e95a8d6404ee5 (diff) | |
download | chromium_src-61a9b2d8a766f0eb9e790385939589797bac37f2.zip chromium_src-61a9b2d8a766f0eb9e790385939589797bac37f2.tar.gz chromium_src-61a9b2d8a766f0eb9e790385939589797bac37f2.tar.bz2 |
Merge the LINUX_TC_MALLOC #define with the existing TC_MALLOC #define.
BUG=36687
TEST=about:tcmalloc, etc, works when tcmalloc is enabled on Linux.
Review URL: http://codereview.chromium.org/660118
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40080 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/render_thread.cc')
-rw-r--r-- | chrome/renderer/render_thread.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/chrome/renderer/render_thread.cc b/chrome/renderer/render_thread.cc index 30c56fd..58d225f 100644 --- a/chrome/renderer/render_thread.cc +++ b/chrome/renderer/render_thread.cc @@ -7,6 +7,7 @@ #include <v8.h> #include <algorithm> +#include <limits> #include <map> #include <vector> @@ -372,7 +373,7 @@ void RenderThread::WidgetHidden() { } void RenderThread::WidgetRestored() { - DCHECK(hidden_widget_count_ > 0); + DCHECK_GT(hidden_widget_count_, 0); hidden_widget_count_--; if (!is_extension_process()) idle_timer_.Stop(); @@ -779,7 +780,7 @@ void RenderThread::EnsureWebKitInitialized() { } void RenderThread::IdleHandler() { -#if defined(OS_WIN) && defined(USE_TCMALLOC) +#if (defined(OS_WIN) || defined(OS_LINUX)) && defined(USE_TCMALLOC) MallocExtension::instance()->ReleaseFreeMemory(); #endif @@ -853,7 +854,7 @@ void RenderThread::OnPurgeMemory() { while (!v8::V8::IdleNotification()) { } -#if defined(OS_WIN) && defined(USE_TCMALLOC) +#if (defined(OS_WIN) || defined(OS_LINUX)) && defined(USE_TCMALLOC) // Tell tcmalloc to release any free pages it's still holding. MallocExtension::instance()->ReleaseFreeMemory(); #endif |