mirror of
https://github.com/HackPlan/atom-shell.git
synced 2026-03-28 23:58:52 +08:00
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:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user