Chromium Code Reviews
Descriptionandroid: 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)
|