From 4b675a741d047c2da6086992caed05d59440f296 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Mon, 23 May 2016 13:01:47 +0900 Subject: [PATCH] Init feature list in node process It is a new dependency of gin. --- atom/app/node_main.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/atom/app/node_main.cc b/atom/app/node_main.cc index b946ae28ff94..6f71d39f5740 100644 --- a/atom/app/node_main.cc +++ b/atom/app/node_main.cc @@ -7,8 +7,9 @@ #include "atom/app/uv_task_runner.h" #include "atom/browser/javascript_environment.h" #include "atom/browser/node_debugger.h" -#include "base/command_line.h" #include "atom/common/node_includes.h" +#include "base/command_line.h" +#include "base/feature_list.h" #include "base/thread_task_runner_handle.h" #include "gin/array_buffer.h" #include "gin/public/isolate_holder.h" @@ -27,6 +28,11 @@ int NodeMain(int argc, char *argv[]) { scoped_refptr uv_task_runner(new UvTaskRunner(loop)); base::ThreadTaskRunnerHandle handle(uv_task_runner); + // Initialize feature list. + std::unique_ptr feature_list(new base::FeatureList); + feature_list->InitializeFromCommandLine("", ""); + base::FeatureList::SetInstance(std::move(feature_list)); + gin::V8Initializer::LoadV8Snapshot(); gin::V8Initializer::LoadV8Natives(); JavascriptEnvironment gin_env;