In https://github.com/electron/electron/commit/7613afe6d70eadd7446db921918dca086cd324c0 I had to disable the check that validates that the call is made on the right thread, because the check fails when the tests run.

Let's make sure the check doesn't fail and re-enable it. Or refactor so that the thread affinity is not required and remove the check.
atom/browser/atom_browser_client.cc
base::AutoLock auto_lock(process_preferences_lock_);
  auto it = process_preferences_.find(process_id);
  return it != process_preferences_.end() && it->second.native_window_open;
}
bool AtomBrowserClient::RendererDisablesPopups(int process_id) {
  base::AutoLock auto_lock(process_preferences_lock_);
  auto it = process_preferences_.find(process_id);
  return it != process_preferences_.end() && it->second.disable_popups;
}
void AtomBrowserClient::RenderProcessWillLaunch(
    content::RenderProcessHost* host) {
  int process_id = host->GetID();
  host->AddFilter(new printing::PrintingMessageFilter(process_id));
  host->AddFilter(new TtsMessageFilter(process_id, host->GetBrowserContext()));
  host->AddFilter(
      new WidevineCdmMessageFilter(process_id, host->GetBrowserContext()));
  content::WebContents* web_contents = GetWebContentsFromProcessID(process_id);
  ProcessPreferences process_prefs;
  process_prefs.sandbox = WebContentsPreferences::IsSandboxed(web_contents);
  process_prefs.native_window_open
      = WebContentsPreferences::UsesNativeWindowOpen(web_contents);
  process_prefs.disable_popups
      = WebContentsPreferences::DisablePopups(web_contents);
  AddProcessPreferences(host->GetID(), process_prefs);
  
  host->AddObserver(this);
}
content::SpeechRecognitionManagerDelegate*