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

Unified Diff: base/android/library_loader/library_prefetcher.cc

Issue 1325053009: cygprofile: increase timeouts to allow showing web contents (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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 | build/common.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/android/library_loader/library_prefetcher.cc
diff --git a/base/android/library_loader/library_prefetcher.cc b/base/android/library_loader/library_prefetcher.cc
index 9b54843fc8329c978b5b9e36a61e88a15f6c7c3a..118e80cc0e7a0d146ad43653e1ef18941b28be59 100644
--- a/base/android/library_loader/library_prefetcher.cc
+++ b/base/android/library_loader/library_prefetcher.cc
@@ -118,6 +118,12 @@ bool NativeLibraryPrefetcher::FindRanges(std::vector<AddressRange>* ranges) {
// static
bool NativeLibraryPrefetcher::ForkAndPrefetchNativeLibrary() {
+ // Avoid forking with cygprofile instrumentation because the latter performs
+ // memory allocations.
+#if defined(CYGPROFILE_INSTRUMENTATION)
+ return false;
+#endif
+
// Looking for ranges is done before the fork, to avoid syscalls and/or memory
// allocations in the forked process. The child process inherits the lock
// state of its parent thread. It cannot rely on being able to acquire any
@@ -126,6 +132,7 @@ bool NativeLibraryPrefetcher::ForkAndPrefetchNativeLibrary() {
std::vector<AddressRange> ranges;
if (!FindRanges(&ranges))
return false;
+
pid_t pid = fork();
if (pid == 0) {
setpriority(PRIO_PROCESS, 0, kBackgroundPriority);
« no previous file with comments | « no previous file | build/common.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698