fix: force SharedArrayBuffer feature to be enabled (#14498)

This commit is contained in:
Jeremy Apthorp 2018-09-08 07:43:03 -07:00 committed by Aleksei Kuzmin
parent 829b230b85
commit 917a905447

View file

@ -29,6 +29,7 @@
#include "brightray/common/application_info.h" #include "brightray/common/application_info.h"
#include "brightray/common/main_delegate.h" #include "brightray/common/main_delegate.h"
#include "content/public/browser/browser_thread.h" #include "content/public/browser/browser_thread.h"
#include "content/public/common/content_features.h"
#include "content/public/common/content_switches.h" #include "content/public/common/content_switches.h"
#include "content/public/common/result_codes.h" #include "content/public/common/result_codes.h"
#include "media/base/localized_strings.h" #include "media/base/localized_strings.h"
@ -181,8 +182,14 @@ void OverrideAppLogsPath() {
void BrowserMainParts::InitializeFeatureList() { void BrowserMainParts::InitializeFeatureList() {
auto* cmd_line = base::CommandLine::ForCurrentProcess(); auto* cmd_line = base::CommandLine::ForCurrentProcess();
const auto enable_features = auto enable_features =
cmd_line->GetSwitchValueASCII(switches::kEnableFeatures); cmd_line->GetSwitchValueASCII(switches::kEnableFeatures);
// Node depends on SharedArrayBuffer support, which was temporarily disabled
// by https://chromium-review.googlesource.com/c/chromium/src/+/849429 (in
// M64) and reenabled by
// https://chromium-review.googlesource.com/c/chromium/src/+/1159358 (in
// M70). Once Electron upgrades to M70, we can remove this.
enable_features += std::string(",") + features::kSharedArrayBuffer.name;
auto disable_features = auto disable_features =
cmd_line->GetSwitchValueASCII(switches::kDisableFeatures); cmd_line->GetSwitchValueASCII(switches::kDisableFeatures);
auto feature_list = std::make_unique<base::FeatureList>(); auto feature_list = std::make_unique<base::FeatureList>();