зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1639435: Remove GeckoProcessManager.buildLogMsg and change its callsite to just use a literal string; r=geckoview-reviewers,droeh
`GeckoProcessManager.buildLogMsg` requires a successful bind to construct its message, but its only remaining callsite is only invoked when a bind fails, so it blows up. This patch eliminates `buildLogMsg` and just changes the callsite to use a string literal. Differential Revision: https://phabricator.services.mozilla.com/D76086
This commit is contained in:
Родитель
40dbaf2901
Коммит
dba6e9ff37
|
@ -133,20 +133,6 @@ public final class GeckoProcessManager extends IProcessManager.Stub {
|
|||
return mPid;
|
||||
}
|
||||
|
||||
private String buildLogMsg(@NonNull final String msgStart) {
|
||||
final StringBuilder builder = new StringBuilder(msgStart);
|
||||
builder.append(" ");
|
||||
builder.append(getType().toString());
|
||||
|
||||
int pid = getPid();
|
||||
if (pid != INVALID_PID) {
|
||||
builder.append(" with pid ");
|
||||
builder.append(pid);
|
||||
}
|
||||
|
||||
return builder.toString();
|
||||
}
|
||||
|
||||
private GeckoResult<IChildProcess> completeFailedBind(@NonNull final ServiceAllocator.BindException e) {
|
||||
XPCOMEventTarget.assertOnLauncherThread();
|
||||
Log.e(LOGTAG, "Failed bind", e);
|
||||
|
@ -177,7 +163,7 @@ public final class GeckoProcessManager extends IProcessManager.Stub {
|
|||
mPendingBind = new GeckoResult<>();
|
||||
try {
|
||||
if (!bindService()) {
|
||||
throw new ServiceAllocator.BindException(buildLogMsg("Cannot connect to process"));
|
||||
throw new ServiceAllocator.BindException("Cannot connect to process");
|
||||
}
|
||||
} catch (final ServiceAllocator.BindException e) {
|
||||
return completeFailedBind(e);
|
||||
|
|
Загрузка…
Ссылка в новой задаче