anchor.diff:        browserTerminationFuture = completer.future;
   
         if (process != null) {
  -        // Make sure we intercept onExit calls and complete.
  -        _processClosed = () {
  -          _processClosed = null;
  +        _processClosedCompleter.future.then((_) {
             process = null;
             completer.complete(true);
  -        };
  +          if (_cleanup != null) {
  +            _cleanup();
  +          }
  +        });
   
           if (process.kill(ProcessSignal.SIGKILL)) {
             _logEvent("Successfully sent kill signal to process.");
  
positive.code:       _logEvent("Got version: $version");
  
        return new Directory('').createTemp().then((userDir) {
          _cleanup = () { userDir.delete(recursive: true); };
          var args = ["--user-data-dir=${userDir.path}", url,
                      "--disable-extensions", "--disable-popup-blocking",
                      "--bwsi", "--no-first-run"];
  
negative.code: 
        return new Directory('').createTemp().then((userDir) {
          _createPreferenceFile(userDir.path);
          _cleanup = () { userDir.deleteSync(recursive: true); };
          var args = ["-profile", "${userDir.path}",
                      "-no-remote", "-new-instance", url];
          return startBrowser(binary, args);
  