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

Unified Diff: content/public/android/java/src/org/chromium/content/app/ChildProcessServiceImpl.java

Issue 2684433003: Files required by a service now listed in manifest. (Closed)
Patch Set: Fix build. Created 3 years, 10 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 | « content/ppapi_plugin/ppapi_plugin_main.cc ('k') | content/public/app/mojo/content_renderer_manifest.json » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/android/java/src/org/chromium/content/app/ChildProcessServiceImpl.java
diff --git a/content/public/android/java/src/org/chromium/content/app/ChildProcessServiceImpl.java b/content/public/android/java/src/org/chromium/content/app/ChildProcessServiceImpl.java
index 8831ec63dedf692a476d363db4b46f30bf661309..7467065d5983eabbeed4b7ad272e5336da3162e2 100644
--- a/content/public/android/java/src/org/chromium/content/app/ChildProcessServiceImpl.java
+++ b/content/public/android/java/src/org/chromium/content/app/ChildProcessServiceImpl.java
@@ -261,10 +261,19 @@ public class ChildProcessServiceImpl {
mMainThread.wait();
}
}
- for (FileDescriptorInfo fdInfo : mFdInfos) {
- nativeRegisterGlobalFileDescriptor(
- fdInfo.mId, fdInfo.mFd.detachFd(), fdInfo.mOffset, fdInfo.mSize);
+
+ int[] fileIds = new int[mFdInfos.length];
+ int[] fds = new int[mFdInfos.length];
+ long[] regionOffsets = new long[mFdInfos.length];
+ long[] regionSizes = new long[mFdInfos.length];
+ for (int i = 0; i < mFdInfos.length; i++) {
+ FileDescriptorInfo fdInfo = mFdInfos[i];
+ fileIds[i] = fdInfo.mId;
+ fds[i] = fdInfo.mFd.detachFd();
+ regionOffsets[i] = fdInfo.mOffset;
+ regionSizes[i] = fdInfo.mSize;
}
+ nativeRegisterFileDescriptors(fileIds, fds, regionOffsets, regionSizes);
nativeInitChildProcessImpl(ChildProcessServiceImpl.this, mCpuCount,
mCpuFeatures);
if (mActivitySemaphore.tryAcquire()) {
@@ -402,12 +411,13 @@ public class ChildProcessServiceImpl {
}
/**
- * Helper for registering FileDescriptorInfo objects with GlobalFileDescriptors.
+ * Helper for registering FileDescriptorInfo objects with GlobalFileDescriptors or
+ * FileDescriptorStore.
* This includes the IPC channel, the crash dump signals and resource related
* files.
*/
- private static native void nativeRegisterGlobalFileDescriptor(
- int id, int fd, long offset, long size);
+ private static native void nativeRegisterFileDescriptors(
+ int[] id, int[] fd, long[] offset, long[] size);
/**
* The main entry point for a child process. This should be called from a new thread since
« no previous file with comments | « content/ppapi_plugin/ppapi_plugin_main.cc ('k') | content/public/app/mojo/content_renderer_manifest.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698