- Electron version: 1.4.3
- Operating system: MacOS 10.11.6

When setCertificateVerifyProc is used, Electron will crash as soon as the callback method is called. Crash log is attached and I've created a very simple project to demonstrate how this can be reproduced: https://github.com/gregnolle/electron-cert-verify-demo

[Electron_2016-10-15-120129_Gregs-iMac.crash.txt](https://github.com/electron/electron/files/531093/Electron_2016-10-15-120129_Gregs-iMac.crash.txt)

atom/browser/atom_browser_context.cc
return cookie_delegate();
}
std::string AtomBrowserContext::GetUserAgent() {
  return user_agent_;
}
std::unique_ptr<net::URLRequestJobFactory>
AtomBrowserContext::CreateURLRequestJobFactory(
    content::ProtocolHandlerMap* protocol_handlers) {
  std::unique_ptr<AtomURLRequestJobFactory> job_factory(
      new AtomURLRequestJobFactory);
  for (auto& it : *protocol_handlers) {
    job_factory->SetProtocolHandler(it.first,
                                    base::WrapUnique(it.second.release()));
  }
  protocol_handlers->clear();
  job_factory->SetProtocolHandler(
      url::kDataScheme, base::WrapUnique(new net::DataProtocolHandler));
  job_factory->SetProtocolHandler(
      url::kFileScheme, base::WrapUnique(new asar::AsarProtocolHandler(
          BrowserThread::GetBlockingPool()->GetTaskRunnerWithShutdownBehavior(
              base::SequencedWorkerPool::SKIP_ON_SHUTDOWN))));
  job_factory->SetProtocolHandler(
      url::kHttpScheme,
      base::WrapUnique(new HttpProtocolHandler(url::kHttpScheme)));
  job_factory->SetProtocolHandler(
      url::kHttpsScheme,
      base::WrapUnique(new HttpProtocolHandler(url::kHttpsScheme)));
  job_factory->SetProtocolHandler(
      url::kWsScheme,
      base::WrapUnique(new HttpProtocolHandler(url::kWsScheme)));