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

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

Issue 258093002: Revert of Limit renderer saved frames to avoid running out of fds. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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/renderer_frame_manager.h ('k') | content/common/host_shared_bitmap_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/renderer_frame_manager.cc
diff --git a/content/browser/renderer_host/renderer_frame_manager.cc b/content/browser/renderer_host/renderer_frame_manager.cc
index 0a93e2989438d20b8373ae99c6fe51a2b051a159..15c9814d61075f032ec5d3196f6eec2071c573d5 100644
--- a/content/browser/renderer_host/renderer_frame_manager.cc
+++ b/content/browser/renderer_host/renderer_frame_manager.cc
@@ -7,9 +7,7 @@
#include <algorithm>
#include "base/logging.h"
-#include "base/memory/shared_memory.h"
#include "base/sys_info.h"
-#include "content/common/host_shared_bitmap_manager.h"
namespace content {
@@ -68,26 +66,14 @@
#else
std::min(5, 2 + (base::SysInfo::AmountOfPhysicalMemoryMB() / 256));
#endif
- max_handles_ = base::SharedMemory::GetHandleLimit() / 8.0f;
}
RendererFrameManager::~RendererFrameManager() {}
void RendererFrameManager::CullUnlockedFrames() {
- uint32 saved_frame_limit = max_number_of_saved_frames();
-
- if (unlocked_frames_.size() + locked_frames_.size() > 0) {
- float handles_per_frame =
- HostSharedBitmapManager::current()->AllocatedBitmapCount() * 1.0f /
- (unlocked_frames_.size() + locked_frames_.size());
-
- saved_frame_limit = std::max(
- 1,
- static_cast<int>(std::min(static_cast<float>(saved_frame_limit),
- max_handles_ / handles_per_frame)));
- }
while (!unlocked_frames_.empty() &&
- unlocked_frames_.size() + locked_frames_.size() > saved_frame_limit) {
+ unlocked_frames_.size() + locked_frames_.size() >
+ max_number_of_saved_frames()) {
size_t old_size = unlocked_frames_.size();
// Should remove self from list.
unlocked_frames_.back()->EvictCurrentFrame();
« no previous file with comments | « content/browser/renderer_host/renderer_frame_manager.h ('k') | content/common/host_shared_bitmap_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698