summaryrefslogtreecommitdiffstats
path: root/content/app
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-26 20:39:01 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-26 20:39:01 +0000
commit57cf978844f365885c897eaa748573822796af32 (patch)
treea4a33227a80e6feb65bca2cd683f9c256261e098 /content/app
parentbce6e4be0debf38250ca05093ac423ffc45d3024 (diff)
downloadchromium_src-57cf978844f365885c897eaa748573822796af32.zip
chromium_src-57cf978844f365885c897eaa748573822796af32.tar.gz
chromium_src-57cf978844f365885c897eaa748573822796af32.tar.bz2
Make ChildThread::current() and ChildProcess::current() only work on the main thread of the child process. In single-process mode, there would be multiple ChildThread objects each using thread local storage to get their value.
Remove ChildThread::IsWebFrameValid since it's not used anymore. BUG=246884 R=scottmg@chromium.org Review URL: https://codereview.chromium.org/17741010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@208777 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/app')
-rw-r--r--content/app/android/child_process_service.cc41
1 files changed, 15 insertions, 26 deletions
diff --git a/content/app/android/child_process_service.cc b/content/app/android/child_process_service.cc
index b06b0b4..d28d81e 100644
--- a/content/app/android/child_process_service.cc
+++ b/content/app/android/child_process_service.cc
@@ -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 @@ class SurfaceTexturePeerChildImpl : public content::SurfaceTexturePeer,
// 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 InternalInitChildProcess(const std::vector<int>& file_ids,
}
-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 @@ bool RegisterChildProcessService(JNIEnv* env) {
}
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