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

Unified Diff: content/public/android/java/src/org/chromium/content/browser/ChildProcessConnectionImpl.java

Issue 2655463012: Really de-flake ChildProcessLauncherTest#testBindServiceFromMultipleProcesses. (Closed)
Patch Set: Simpler poll criteria. Created 3 years, 11 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 | « no previous file | content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java » ('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/browser/ChildProcessConnectionImpl.java
diff --git a/content/public/android/java/src/org/chromium/content/browser/ChildProcessConnectionImpl.java b/content/public/android/java/src/org/chromium/content/browser/ChildProcessConnectionImpl.java
index 23534feac5a5a0b7fb11cabfeade5d0fdae73ac5..4e562185e3b20368bd3ab8bef584ccc8cfb1690a 100644
--- a/content/public/android/java/src/org/chromium/content/browser/ChildProcessConnectionImpl.java
+++ b/content/public/android/java/src/org/chromium/content/browser/ChildProcessConnectionImpl.java
@@ -42,6 +42,9 @@ public class ChildProcessConnectionImpl implements ChildProcessConnection {
// into the class are synchronized on the lock to protect access to these members.
private final Object mLock = new Object();
private IChildProcessService mService;
+ // Set to true when the service connection callback runs. This differs from
+ // mServiceConnectComplete, which tracks that the connection completed successfully.
+ private boolean mDidOnServiceConnected;
// Set to true when the service connected successfully.
private boolean mServiceConnectComplete;
// Set to true when the service disconnects, as opposed to being properly closed. This happens
@@ -163,13 +166,13 @@ public class ChildProcessConnectionImpl implements ChildProcessConnection {
synchronized (mLock) {
// A flag from the parent class ensures we run the post-connection logic only once
// (instead of once per each ChildServiceConnection).
- if (mServiceConnectComplete) {
+ if (mDidOnServiceConnected) {
return;
}
try {
TraceEvent.begin(
"ChildProcessConnectionImpl.ChildServiceConnection.onServiceConnected");
- mServiceConnectComplete = true;
+ mDidOnServiceConnected = true;
mService = IChildProcessService.Stub.asInterface(service);
boolean boundToUs = false;
@@ -191,6 +194,8 @@ public class ChildProcessConnectionImpl implements ChildProcessConnection {
return;
}
+ mServiceConnectComplete = true;
+
// Run the setup if the connection parameters have already been provided. If
// not, doConnectionSetupLocked() will be called from setupConnection().
if (mConnectionParams != null) {
« no previous file with comments | « no previous file | content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698