diff --git a/atom/browser/api/atom_api_protocol.cc b/atom/browser/api/atom_api_protocol.cc index 71da0869cc74..ccc87db2d5c5 100644 --- a/atom/browser/api/atom_api_protocol.cc +++ b/atom/browser/api/atom_api_protocol.cc @@ -322,6 +322,10 @@ mate::Handle Protocol::Create(v8::Isolate* isolate) { namespace { void Initialize(v8::Handle exports) { + // Make sure the job factory has been created. + atom::AtomBrowserContext::Get()->url_request_context_getter()-> + GetURLRequestContext(); + v8::Isolate* isolate = v8::Isolate::GetCurrent(); mate::Dictionary dict(isolate, exports); dict.Set("protocol", atom::api::Protocol::Create(isolate));