New issue
Advanced search Search tips

Issue 612597 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 1
Type: Bug



Sign in to add a comment

Cleanup Chrome dex loading from WebApks

Project Member Reported by yfried...@chromium.org, May 17 2016

Issue description

I'm trying to fix two separate issues:
1) WebApkApplication currently loads chrome's dex file in all processes and shouldn't
2) Remove the content dependency I introduced in https://codereview.chromium.org/1967733002/

One way to do this would be to have the WebApk define custom classes for privileged/sandboxed renderers and these would either subclass chrome's or possibly more simply, compose an instance. We could then move the code from WebApkApplication into the service class, and forward all methods from the service API to the underlying ChildProcessService. We'd inject the host browser's context at the right place to resolve (2).

The only other change would be in WebappActivity to pass the overriden classname as part of the child process creation params.

wdyt?
Peter, I'm specifically interested in your feedback and wondering whether DexLoader could be reused in lieu of the reflection we currently have
 
We could definitely get rid of the reflection. We would need to create a wrapper of ChildProcessService which:
- Creates a ClassLoader with Chrome's code via DexClassLoader
- Uses the returned ClassLoader to do the method call on the real ChildProcessService implementation 
Cc: yfried...@chromium.org
Owner: ----
Status: Available (was: Assigned)
Unfortunately, not going to get to this change this week.
I think my original proposal still works. As for getting rid of the reflection my primary concern (and which needs verification) is whether JNI calls from C++ would be able to find classes in the classloader. I can't see how they really would but perhaps there's a way to do it
Owner: hanxi@chromium.org
Status: Fixed (was: Available)
Xi did this as part of https://codereview.chromium.org/2049843004

Sign in to add a comment