icecat: add release icecat-140.6.0-1gnu1 for ecne
This commit is contained in:
parent
618c9f4145
commit
7d0f5dab3b
3382 changed files with 457689 additions and 569094 deletions
Binary file not shown.
|
|
@ -5,5 +5,5 @@
|
|||
package org.mozilla.gecko.crashhelper;
|
||||
|
||||
interface ICrashHelper {
|
||||
boolean start(in int mainProcessPid, in ParcelFileDescriptor breakpadFd, in String minidumpPath, in ParcelFileDescriptor listenFd, in ParcelFileDescriptor serverFd);
|
||||
boolean start(in ParcelFileDescriptor breakpadFd, in String minidumpPath, in ParcelFileDescriptor serverFd);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@ import android.os.Binder;
|
|||
import android.os.DeadObjectException;
|
||||
import android.os.IBinder;
|
||||
import android.os.ParcelFileDescriptor;
|
||||
import android.os.Process;
|
||||
import android.os.RemoteException;
|
||||
import android.system.ErrnoException;
|
||||
import android.system.Os;
|
||||
|
|
@ -43,10 +42,8 @@ public final class CrashHelper extends Service {
|
|||
private static class CrashHelperBinder extends ICrashHelper.Stub {
|
||||
@Override
|
||||
public boolean start(
|
||||
final int clientPid,
|
||||
final ParcelFileDescriptor breakpadFd,
|
||||
final String minidumpPath,
|
||||
final ParcelFileDescriptor listenFd,
|
||||
final ParcelFileDescriptor serverFd) {
|
||||
// Launch the crash helper code, this will spin out a thread which will
|
||||
// handle the IPC with IceCat' other processes. When running junit tests
|
||||
|
|
@ -56,8 +53,7 @@ public final class CrashHelper extends Service {
|
|||
// "steal" the crash report of another main process. We should add
|
||||
// additional separation within the crash generation code to prevent this
|
||||
// from happening even though it's very unlikely.
|
||||
CrashHelper.crash_generator(
|
||||
clientPid, breakpadFd.detachFd(), minidumpPath, listenFd.detachFd(), serverFd.detachFd());
|
||||
CrashHelper.crash_generator(breakpadFd.detachFd(), minidumpPath, serverFd.detachFd());
|
||||
|
||||
return false;
|
||||
}
|
||||
|
|
@ -71,17 +67,14 @@ public final class CrashHelper extends Service {
|
|||
public static ServiceConnection createConnection(
|
||||
final ParcelFileDescriptor breakpadFd,
|
||||
final String minidumpPath,
|
||||
final ParcelFileDescriptor listenFd,
|
||||
final ParcelFileDescriptor serverFd) {
|
||||
class CrashHelperConnection implements ServiceConnection {
|
||||
public CrashHelperConnection(
|
||||
final ParcelFileDescriptor breakpadFd,
|
||||
final String minidumpPath,
|
||||
final ParcelFileDescriptor listenFd,
|
||||
final ParcelFileDescriptor serverFd) {
|
||||
mBreakpadFd = breakpadFd;
|
||||
mMinidumpPath = minidumpPath;
|
||||
mListenFd = listenFd;
|
||||
mServerFd = serverFd;
|
||||
}
|
||||
|
||||
|
|
@ -89,7 +82,7 @@ public final class CrashHelper extends Service {
|
|||
public void onServiceConnected(final ComponentName name, final IBinder service) {
|
||||
final ICrashHelper helper = ICrashHelper.Stub.asInterface(service);
|
||||
try {
|
||||
helper.start(Process.myPid(), mBreakpadFd, mMinidumpPath, mListenFd, mServerFd);
|
||||
helper.start(mBreakpadFd, mMinidumpPath, mServerFd);
|
||||
} catch (final DeadObjectException e) {
|
||||
// The crash helper process died before we could start it, presumably
|
||||
// because of an out-of-memory condition. We don't attempt to restart
|
||||
|
|
@ -107,24 +100,21 @@ public final class CrashHelper extends Service {
|
|||
|
||||
ParcelFileDescriptor mBreakpadFd;
|
||||
String mMinidumpPath;
|
||||
ParcelFileDescriptor mListenFd;
|
||||
ParcelFileDescriptor mServerFd;
|
||||
}
|
||||
|
||||
return new CrashHelperConnection(breakpadFd, minidumpPath, listenFd, serverFd);
|
||||
return new CrashHelperConnection(breakpadFd, minidumpPath, serverFd);
|
||||
}
|
||||
|
||||
public static final class Pipes {
|
||||
public final ParcelFileDescriptor mBreakpadClient;
|
||||
public final ParcelFileDescriptor mBreakpadServer;
|
||||
public final ParcelFileDescriptor mListener;
|
||||
public final ParcelFileDescriptor mClient;
|
||||
public final ParcelFileDescriptor mServer;
|
||||
|
||||
public Pipes(
|
||||
final FileDescriptor breakpadClientFd,
|
||||
final FileDescriptor breakpadServerFd,
|
||||
final FileDescriptor listenerFd,
|
||||
final FileDescriptor clientFd,
|
||||
final FileDescriptor serverFd)
|
||||
throws IOException {
|
||||
|
|
@ -133,10 +123,6 @@ public final class CrashHelper extends Service {
|
|||
if (!CrashHelper.set_breakpad_opts(mBreakpadServer.getFd())) {
|
||||
throw new IOException("Could not set the proper options on the Breakpad socket");
|
||||
}
|
||||
mListener = ParcelFileDescriptor.dup(listenerFd);
|
||||
if (!CrashHelper.bind_and_listen(mListener.getFd())) {
|
||||
throw new IOException("Could not listen on incoming connections");
|
||||
}
|
||||
mClient = ParcelFileDescriptor.dup(clientFd);
|
||||
mServer = ParcelFileDescriptor.dup(serverFd);
|
||||
}
|
||||
|
|
@ -151,8 +137,8 @@ public final class CrashHelper extends Service {
|
|||
public static Pipes createCrashHelperPipes(final Context context) {
|
||||
try {
|
||||
// We can't set the required socket options for the Breakpad server socket
|
||||
// or our own listener from here, so we delegate those parts to native
|
||||
// functions in crashhelper_android.cpp.
|
||||
// so we delegate those parts to native functions in
|
||||
// crashhelper_android.cpp.
|
||||
GeckoLoader.doLoadLibrary(null, "crashhelper");
|
||||
|
||||
final FileDescriptor breakpad_client_fd = new FileDescriptor();
|
||||
|
|
@ -163,14 +149,11 @@ public final class CrashHelper extends Service {
|
|||
0,
|
||||
breakpad_client_fd,
|
||||
breakpad_server_fd);
|
||||
final FileDescriptor listener_fd =
|
||||
Os.socket(OsConstants.AF_UNIX, OsConstants.SOCK_SEQPACKET, 0);
|
||||
final FileDescriptor client_fd = new FileDescriptor();
|
||||
final FileDescriptor server_fd = new FileDescriptor();
|
||||
Os.socketpair(OsConstants.AF_UNIX, OsConstants.SOCK_SEQPACKET, 0, client_fd, server_fd);
|
||||
|
||||
final Pipes pipes =
|
||||
new Pipes(breakpad_client_fd, breakpad_server_fd, listener_fd, client_fd, server_fd);
|
||||
final Pipes pipes = new Pipes(breakpad_client_fd, breakpad_server_fd, client_fd, server_fd);
|
||||
|
||||
// Manually close all the file descriptors we created.
|
||||
// ParcelFileDescriptor instances in the Pipes object will close their
|
||||
|
|
@ -178,7 +161,6 @@ public final class CrashHelper extends Service {
|
|||
// not, leaving us the job to clean them up.
|
||||
Os.close(breakpad_client_fd);
|
||||
Os.close(breakpad_server_fd);
|
||||
Os.close(listener_fd);
|
||||
Os.close(client_fd);
|
||||
Os.close(server_fd);
|
||||
return pipes;
|
||||
|
|
@ -192,10 +174,7 @@ public final class CrashHelper extends Service {
|
|||
// `stopWithTask` flag set in the manifest, so the service manager will
|
||||
// tear it down for us.
|
||||
|
||||
protected static native void crash_generator(
|
||||
int clientPid, int breakpadFd, String minidumpPath, int listenFd, int serverFd);
|
||||
protected static native void crash_generator(int breakpadFd, String minidumpPath, int serverFd);
|
||||
|
||||
protected static native boolean set_breakpad_opts(int breakpadFd);
|
||||
|
||||
protected static native boolean bind_and_listen(int listenFd);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -459,8 +459,7 @@ public final class GeckoRuntime implements Parcelable {
|
|||
final File minidumps = new File(context.getFilesDir(), "minidumps");
|
||||
context.bindService(
|
||||
i,
|
||||
CrashHelper.createConnection(
|
||||
pipes.mBreakpadServer, minidumps.getPath(), pipes.mListener, pipes.mServer),
|
||||
CrashHelper.createConnection(pipes.mBreakpadServer, minidumps.getPath(), pipes.mServer),
|
||||
Context.BIND_AUTO_CREATE);
|
||||
} catch (final ClassNotFoundException e) {
|
||||
Log.w(LOGTAG, "Couldn't find the crash helper class");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue