diff --git a/atom/app/node_main.cc b/atom/app/node_main.cc index 94a727f5aa90..3111e9be39a3 100644 --- a/atom/app/node_main.cc +++ b/atom/app/node_main.cc @@ -45,6 +45,8 @@ int NodeMain(int argc, char *argv[]) { // V8 requires a task scheduler apparently base::TaskScheduler::CreateAndStartWithDefaultParams("Electron"); + // Initialize gin::IsolateHolder. + JavascriptEnvironment::Initialize(); JavascriptEnvironment gin_env; int exec_argc; diff --git a/atom/browser/api/atom_api_debugger.cc b/atom/browser/api/atom_api_debugger.cc index 92193c480ba7..da8b212be024 100644 --- a/atom/browser/api/atom_api_debugger.cc +++ b/atom/browser/api/atom_api_debugger.cc @@ -49,11 +49,11 @@ void Debugger::DispatchProtocolMessage(DevToolsAgentHost* agent_host, v8::Locker locker(isolate()); v8::HandleScope handle_scope(isolate()); - std::unique_ptr result = base::JSONReader::Read(message); - if (!result || !result->is_dict()) + std::unique_ptr parsed_message = base::JSONReader::Read(message); + if (!parsed_message || !parsed_message->is_dict()) return; base::DictionaryValue* dict = - static_cast(result.get()); + static_cast(parsed_message.get()); int id; if (!dict->GetInteger("id", &id)) { std::string method;