"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "shell/browser/electron_browser_main_parts.cc" between
electron-11.2.3.tar.gz and electron-11.3.0.tar.gz

About: Electron is a framework for creating native cross platform applications with web technologies like JavaScript, HTML, and CSS.

electron_browser_main_parts.cc  (electron-11.2.3):electron_browser_main_parts.cc  (electron-11.3.0)
skipping to change at line 280 skipping to change at line 280
return false; return false;
*exit_code_ = code; *exit_code_ = code;
return true; return true;
} }
int ElectronBrowserMainParts::GetExitCode() { int ElectronBrowserMainParts::GetExitCode() {
return exit_code_ != nullptr ? *exit_code_ : 0; return exit_code_ != nullptr ? *exit_code_ : 0;
} }
void ElectronBrowserMainParts::RegisterDestructionCallback(
base::OnceClosure callback) {
// The destructors should be called in reversed order, so dependencies between
// JavaScript objects can be correctly resolved.
// For example WebContentsView => WebContents => Session.
destructors_.insert(destructors_.begin(), std::move(callback));
}
int ElectronBrowserMainParts::PreEarlyInitialization() { int ElectronBrowserMainParts::PreEarlyInitialization() {
field_trial_list_ = std::make_unique<base::FieldTrialList>(nullptr); field_trial_list_ = std::make_unique<base::FieldTrialList>(nullptr);
#if defined(USE_X11) #if defined(USE_X11)
OverrideLinuxAppDataPath(); OverrideLinuxAppDataPath();
// Installs the X11 error handlers for the browser process used during // Installs the X11 error handlers for the browser process used during
// startup. They simply print error messages and exit because // startup. They simply print error messages and exit because
// we can't shutdown properly while creating and initializing services. // we can't shutdown properly while creating and initializing services.
ui::SetX11ErrorHandlers(nullptr, nullptr); ui::SetX11ErrorHandlers(nullptr, nullptr);
#endif #endif
skipping to change at line 580 skipping to change at line 572
// Shutdown the DownloadManager before destroying Node to prevent // Shutdown the DownloadManager before destroying Node to prevent
// DownloadItem callbacks from crashing. // DownloadItem callbacks from crashing.
for (auto& iter : ElectronBrowserContext::browser_context_map()) { for (auto& iter : ElectronBrowserContext::browser_context_map()) {
auto* download_manager = auto* download_manager =
content::BrowserContext::GetDownloadManager(iter.second.get()); content::BrowserContext::GetDownloadManager(iter.second.get());
if (download_manager) { if (download_manager) {
download_manager->Shutdown(); download_manager->Shutdown();
} }
} }
// Make sure destruction callbacks are called before message loop is
// destroyed, otherwise some objects that need to be deleted on IO thread
// won't be freed.
// We don't use ranged for loop because iterators are getting invalided when
// the callback runs.
for (auto iter = destructors_.begin(); iter != destructors_.end();) {
base::OnceClosure callback = std::move(*iter);
if (!callback.is_null())
std::move(callback).Run();
++iter;
}
// Destroy node platform after all destructors_ are executed, as they may // Destroy node platform after all destructors_ are executed, as they may
// invoke Node/V8 APIs inside them. // invoke Node/V8 APIs inside them.
node_debugger_->Stop(); node_debugger_->Stop();
node_env_->env()->set_trace_sync_io(false); node_env_->env()->set_trace_sync_io(false);
js_env_->OnMessageLoopDestroying(); js_env_->OnMessageLoopDestroying();
node::Stop(node_env_->env()); node::Stop(node_env_->env());
node_env_.reset(); node_env_.reset();
ElectronBrowserContext::browser_context_map().clear(); ElectronBrowserContext::browser_context_map().clear();
 End of changes. 2 change blocks. 
20 lines changed or deleted 0 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)