Make sure the job factory is created when initializing protocol module.
Fixes atom/atom#1963, the regression came when moving to use native-mate to reimplment the APIs.
This commit is contained in:
parent
c841d90529
commit
a67c54869f
1 changed files with 4 additions and 0 deletions
|
@ -322,6 +322,10 @@ mate::Handle<Protocol> Protocol::Create(v8::Isolate* isolate) {
|
|||
namespace {
|
||||
|
||||
void Initialize(v8::Handle<v8::Object> 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));
|
||||
|
|
Loading…
Reference in a new issue