8000 fix: Improve --enable-features/--disable-features handling (2.0.x) by poiru · Pull Request #13921 · electron/electron · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix: Improve --enable-features/--disable-features handling (2.0.x) #13921

8000
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 3, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions atom/browser/atom_browser_main_parts.cc
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,14 @@ void AtomBrowserMainParts::PostEarlyInitialization() {

// Wrap the uv loop with global env.
node_bindings_->set_uv_env(env);

// We already initialized the feature list in
// brightray::BrowserMainParts::PreEarlyInitialization(), but
// the user JS script would not have had a chance to alter the command-line
// switches at that point. Lets reinitialize it here to pick up the
// command-line changes.
base::FeatureList::ClearInstanceForTesting();
brightray::BrowserMainParts::InitializeFeatureList();
}

int AtomBrowserMainParts::PreCreateThreads() {
Expand Down
10 changes: 0 additions & 10 deletions brightray/browser/browser_main_parts.cc
Original file line number Diff line number Diff line change
Expand Up @@ -266,16 +266,6 @@ void BrowserMainParts::PreMainMessageLoopStart() {
}

void BrowserMainParts::PreMainMessageLoopRun() {
// We already initialized feature list in PreEarlyInitialization(), but
// the user JS script would not have had a chance to alter the command-line
// switches at that point. Lets reinitialize it here to pick up the
// command-line changes. Note that some Chromium code (e.g.
// gpu_process_host.cc) queries the feature list between
// PreEarlyInitialization() and here so the user script may not have
// control over all features. Better than nothing though!
base::FeatureList::ClearInstanceForTesting();
InitializeFeatureList();

content::WebUIControllerFactory::RegisterFactory(
WebUIControllerFactory::GetInstance());

Expand Down
4 changes: 2 additions & 2 deletions brightray/browser/browser_main_parts.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,14 @@ class BrowserMainParts : public content::BrowserMainParts {
int PreCreateThreads() override;
void PostDestroyThreads() override;

void InitializeFeatureList();

private:
#if defined(OS_MACOSX)
void InitializeMainNib();
void OverrideAppLogsPath();
#endif

void InitializeFeatureList();

std::unique_ptr<IOThread> io_thread_;

#if defined(TOOLKIT_VIEWS)
Expand Down
0