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

Unified Diff: content/app/android/child_process_service.cc

Issue 17741010: Make ChildThread::current() and ChildProcess::current() only work on the main thread of the child... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync and also fix gpu single process case Created 7 years, 6 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 | content/browser/gpu/gpu_process_host.cc » ('j') | content/child/child_thread.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/app/android/child_process_service.cc
===================================================================
--- content/app/android/child_process_service.cc (revision 208740)
+++ content/app/android/child_process_service.cc (working copy)
@@ -10,7 +10,6 @@
#include "base/android/jni_array.h"
#include "base/logging.h"
#include "base/posix/global_descriptors.h"
-#include "content/child/child_process.h"
#include "content/child/child_thread.h"
#include "content/common/android/surface_texture_peer.h"
#include "content/common/gpu/gpu_surface_lookup.h"
@@ -81,13 +80,13 @@
// Chrome actually uses the renderer code path for all of its child
// processes such as renderers, plugins, etc.
void InternalInitChildProcess(const std::vector<int>& file_ids,
- const std::vector<int>& file_fds,
- JNIEnv* env,
- jclass clazz,
- jobject context,
- jobject service_in,
- jint cpu_count,
- jlong cpu_features) {
+ const std::vector<int>& file_fds,
+ JNIEnv* env,
+ jclass clazz,
+ jobject context,
+ jobject service_in,
+ jint cpu_count,
+ jlong cpu_features) {
base::android::ScopedJavaLocalRef<jobject> service(env, service_in);
// Set the CPU properties.
@@ -104,20 +103,16 @@
}
-void QuitMainThreadMessageLoop() {
- base::MessageLoop::current()->Quit();
-}
-
} // namespace <anonymous>
void InitChildProcess(JNIEnv* env,
- jclass clazz,
- jobject context,
- jobject service,
- jintArray j_file_ids,
- jintArray j_file_fds,
- jint cpu_count,
- jlong cpu_features) {
+ jclass clazz,
+ jobject context,
+ jobject service,
+ jintArray j_file_ids,
+ jintArray j_file_fds,
+ jint cpu_count,
+ jlong cpu_features) {
std::vector<int> file_ids;
std::vector<int> file_fds;
JavaIntArrayToIntVector(env, j_file_ids, &file_ids);
@@ -139,13 +134,7 @@
}
void ShutdownMainThread(JNIEnv* env, jobject obj) {
- ChildProcess* current_process = ChildProcess::current();
- if (!current_process)
- return;
- ChildThread* main_child_thread = current_process->main_thread();
- if (main_child_thread && main_child_thread->message_loop())
- main_child_thread->message_loop()->PostTask(FROM_HERE,
- base::Bind(&QuitMainThreadMessageLoop));
+ ChildThread::ShutdownThread();
}
} // namespace content
« no previous file with comments | « no previous file | content/browser/gpu/gpu_process_host.cc » ('j') | content/child/child_thread.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698