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

Issue 2774163002: android: Java ChildProcessLauncherHelper instance (Closed)

Created:
3 years, 9 months ago by boliu
Modified:
3 years, 9 months ago
Reviewers:
Jay Civelli, Maria
CC:
chromium-reviews, jam, darin-cc_chromium.org, agrieve+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

android: Java ChildProcessLauncherHelper instance This is mostly meant to be a no-op refactor. There is a long term need to have ChildProcessLauncher(Helper) to have a java _instance_ to save state, as an alternative to putting things into global maps keyed by the pid. See bug for specific use. So create a java ChildProcessLauncherHelper, which is instantiated and owned by native ChildProcessLauncherHelper. Then move all jni calls from ChildProcessLauncher (which only had static methods) to ChildProcessLauncherHelper. Also convert the jni calls from static calls to instance calls where possible; the major except right is Terminate/Stop, because it's used as a static method. Replace the opaque "clientContext" native pointer in ChildProcessLauncher with a java callback implemented by Helper. Helper should hold a pointer directly to native peer, but due to threading/ownership issues, it is set back to 0 before native side is actually deleted. BUG=689758 Review-Url: https://codereview.chromium.org/2774163002 Cr-Commit-Position: refs/heads/master@{#459916} Committed: https://chromium.googlesource.com/chromium/src/+/4ff655334a321362a3611d0e1d0f1c1c123dac08

Patch Set 1 #

Patch Set 2 : works? #

Patch Set 3 : rebase #

Patch Set 4 : cleanups #

Total comments: 4

Patch Set 5 : explicit AddRef #

Messages

Total messages: 21 (14 generated)
boliu
ptal jcivelli for the native parts maria for the java parts
3 years, 9 months ago (2017-03-27 16:02:39 UTC) #6
Maria
lgtm https://codereview.chromium.org/2774163002/diff/60001/content/browser/child_process_launcher_helper_android.cc File content/browser/child_process_launcher_helper_android.cc (right): https://codereview.chromium.org/2774163002/diff/60001/content/browser/child_process_launcher_helper_android.cc#newcode214 content/browser/child_process_launcher_helper_android.cc:214: delete reinterpret_cast<scoped_refptr<ChildProcessLauncherHelper>*>(pointer); these two lines look really odd ...
3 years, 9 months ago (2017-03-27 19:22:52 UTC) #11
Jay Civelli
https://codereview.chromium.org/2774163002/diff/60001/content/browser/child_process_launcher_helper_android.cc File content/browser/child_process_launcher_helper_android.cc (right): https://codereview.chromium.org/2774163002/diff/60001/content/browser/child_process_launcher_helper_android.cc#newcode214 content/browser/child_process_launcher_helper_android.cc:214: delete reinterpret_cast<scoped_refptr<ChildProcessLauncherHelper>*>(pointer); Could OnChildProcessStarted be a non static method ...
3 years, 9 months ago (2017-03-27 19:49:48 UTC) #12
boliu
https://codereview.chromium.org/2774163002/diff/60001/content/browser/child_process_launcher_helper_android.cc File content/browser/child_process_launcher_helper_android.cc (right): https://codereview.chromium.org/2774163002/diff/60001/content/browser/child_process_launcher_helper_android.cc#newcode214 content/browser/child_process_launcher_helper_android.cc:214: delete reinterpret_cast<scoped_refptr<ChildProcessLauncherHelper>*>(pointer); On 2017/03/27 19:49:48, Jay Civelli wrote: > ...
3 years, 9 months ago (2017-03-27 20:47:53 UTC) #13
Jay Civelli
lgtm
3 years, 9 months ago (2017-03-27 21:12:34 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2774163002/80001
3 years, 9 months ago (2017-03-27 21:23:47 UTC) #18
commit-bot: I haz the power
3 years, 9 months ago (2017-03-27 22:50:27 UTC) #21
Message was sent while issue was closed.
Committed patchset #5 (id:80001) as
https://chromium.googlesource.com/chromium/src/+/4ff655334a321362a3611d0e1d0f...

Powered by Google App Engine
This is Rietveld 408576698