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

Unified Diff: chrome/browser/service_process/service_process_control.cc

Issue 510563004: Temporary allocation of 20Mb before and after call to ServiceProcessControl::GetHistograms. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Wed Aug 27 17:26:56 PDT 2014 Created 6 years, 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/service_process/service_process_control.cc
diff --git a/chrome/browser/service_process/service_process_control.cc b/chrome/browser/service_process/service_process_control.cc
index 193f1f08d97614e22ee4f5970f431b72e176dda8..5cd8371bf94b41cb373c3d9e796ec1049366639b 100644
--- a/chrome/browser/service_process/service_process_control.cc
+++ b/chrome/browser/service_process/service_process_control.cc
@@ -25,6 +25,18 @@
using content::BrowserThread;
+namespace {
+
+void AllocDebugTest() {
+ // TODO(vitalybuka): Remove after few Canary builds.
+ // See http://crbug.com/406227
+ void* buffer = malloc(20 * 1024 * 1024);
tapted 2014/08/28 01:07:27 nit: Maybe guard these lines in #if defined(OS_MAC
Vitaly Buka (NO REVIEWS) 2014/08/28 03:24:51 Done.
+ CHECK(buffer);
+ free(buffer);
+}
+
+} // namespace
+
// ServiceProcessControl implementation.
ServiceProcessControl::ServiceProcessControl() {
}
@@ -223,6 +235,7 @@ void ServiceProcessControl::OnHistograms(
}
void ServiceProcessControl::RunHistogramsCallback() {
+ AllocDebugTest();
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
if (!histograms_callback_.is_null()) {
histograms_callback_.Run();
@@ -259,6 +272,7 @@ bool ServiceProcessControl::GetCloudPrintProxyInfo(
bool ServiceProcessControl::GetHistograms(
const base::Closure& histograms_callback,
const base::TimeDelta& timeout) {
+ AllocDebugTest();
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DCHECK(!histograms_callback.is_null());
histograms_callback_.Reset();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698