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

Side by Side Diff: base/threading/platform_thread_android.cc

Issue 2202793002: base: Remove unneeded RegisterNatives() calls on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@jnireg2
Patch Set: rebase Created 4 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 unified diff | Download patch
« no previous file with comments | « base/test/test_ui_thread_android.cc ('k') | blimp/test/run_all_unittests.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/threading/platform_thread.h" 5 #include "base/threading/platform_thread.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <sys/prctl.h> 9 #include <sys/prctl.h>
10 #include <sys/resource.h> 10 #include <sys/resource.h>
11 #include <sys/types.h> 11 #include <sys/types.h>
12 #include <unistd.h> 12 #include <unistd.h>
13 13
14 #include "base/android/jni_android.h" 14 #include "base/android/jni_android.h"
15 #include "base/android/thread_utils.h"
16 #include "base/lazy_instance.h" 15 #include "base/lazy_instance.h"
17 #include "base/logging.h" 16 #include "base/logging.h"
18 #include "base/threading/platform_thread_internal_posix.h" 17 #include "base/threading/platform_thread_internal_posix.h"
19 #include "base/threading/thread_id_name_manager.h" 18 #include "base/threading/thread_id_name_manager.h"
20 #include "base/tracked_objects.h" 19 #include "base/tracked_objects.h"
21 #include "jni/ThreadUtils_jni.h" 20 #include "jni/ThreadUtils_jni.h"
22 21
23 namespace base { 22 namespace base {
24 23
25 namespace internal { 24 namespace internal {
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 size_t GetDefaultThreadStackSize(const pthread_attr_t& attributes) { 88 size_t GetDefaultThreadStackSize(const pthread_attr_t& attributes) {
90 #if !defined(ADDRESS_SANITIZER) 89 #if !defined(ADDRESS_SANITIZER)
91 return 0; 90 return 0;
92 #else 91 #else
93 // AddressSanitizer bloats the stack approximately 2x. Default stack size of 92 // AddressSanitizer bloats the stack approximately 2x. Default stack size of
94 // 1Mb is not enough for some tests (see http://crbug.com/263749 for example). 93 // 1Mb is not enough for some tests (see http://crbug.com/263749 for example).
95 return 2 * (1 << 20); // 2Mb 94 return 2 * (1 << 20); // 2Mb
96 #endif 95 #endif
97 } 96 }
98 97
99 bool RegisterThreadUtils(JNIEnv* env) {
100 return RegisterNativesImpl(env);
101 }
102
103 } // namespace base 98 } // namespace base
OLDNEW
« no previous file with comments | « base/test/test_ui_thread_android.cc ('k') | blimp/test/run_all_unittests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698