Skip to content

Commit 9c24fb7

Browse files
committed
No longer redirecting console output for Firefox in .NET bindings.
This information was largely unused by anyone, and the implementation had a chance to produce deadlocks when reading from the console output stream for stdout and stderr. Hopefully, this will help prevent some of the problems with issue #3719.
1 parent 9b4e0ea commit 9c24fb7

File tree

1 file changed

+2
-20
lines changed

1 file changed

+2
-20
lines changed

dotnet/src/webdriver/Firefox/FirefoxBinary.cs

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ public class FirefoxBinary
4545
private Executable executable;
4646
private Process process;
4747
private TimeSpan timeout = TimeSpan.FromSeconds(45);
48-
private StreamReader stream;
4948
#endregion
5049

5150
#region Constructors
@@ -91,17 +90,10 @@ public TimeSpan Timeout
9190
/// Gets all console output of the binary.
9291
/// </summary>
9392
/// <remarks>Output retrieval is non-destructive and non-blocking.</remarks>
93+
[Obsolete("This property is largely unused, and will be removed in a future revision")]
9494
public string ConsoleOutput
9595
{
96-
get
97-
{
98-
if (this.process == null)
99-
{
100-
return null;
101-
}
102-
103-
return this.stream.ReadToEnd();
104-
}
96+
get { return string.Empty; }
10597
}
10698
#endregion
10799

@@ -225,12 +217,7 @@ public void CreateProfile(string profileName)
225217
Process builder = new Process();
226218
builder.StartInfo.FileName = this.executable.ExecutablePath;
227219
builder.StartInfo.Arguments = "--verbose -CreateProfile " + profileName;
228-
builder.StartInfo.RedirectStandardError = true;
229220
builder.StartInfo.EnvironmentVariables.Add("MOZ_NO_REMOTE", "1");
230-
if (this.stream == null)
231-
{
232-
this.stream = builder.StandardOutput;
233-
}
234221

235222
this.StartFirefoxProcess(builder);
236223
}
@@ -316,10 +303,6 @@ protected void StartFirefoxProcess(Process builder)
316303

317304
this.process = builder;
318305
this.process.Start();
319-
if (this.stream == null)
320-
{
321-
this.stream = builder.StandardOutput;
322-
}
323306
}
324307

325308
private static void Sleep(int timeInMilliseconds)
@@ -446,7 +429,6 @@ private void CopeWithTheStrangenessOfTheMac(Process builder)
446429
}
447430

448431
StringBuilder message = new StringBuilder("Unable to start firefox cleanly.\n");
449-
message.Append(this.ConsoleOutput).Append("\n");
450432
message.Append("Exit value: ").Append(this.process.ExitCode.ToString(CultureInfo.InvariantCulture)).Append("\n");
451433
message.Append("Ran from: ").Append(builder.StartInfo.FileName).Append("\n");
452434
throw new WebDriverException(message.ToString());

0 commit comments

Comments
 (0)