refactor: update return type of PreMainMessageLoopRun()

Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2725153

Used to return void; now returns an int errorcode.

Note: 2725153 also has some nice doc updates about Browser's "stages"
This commit is contained in:
Charles Kerr
2021-03-31 17:18:13 -05:00
committed by Samuel Attard
parent bfe55a9c68
commit 2622e91c44
2 changed files with 4 additions and 2 deletions

View File

@@ -416,7 +416,7 @@ void ElectronBrowserMainParts::ToolkitInitialized() {
#endif
}
void ElectronBrowserMainParts::PreMainMessageLoopRun() {
int ElectronBrowserMainParts::PreMainMessageLoopRun() {
// Run user's main script before most things get initialized, so we can have
// a chance to setup everything.
node_bindings_->PrepareMessageLoop();
@@ -472,6 +472,8 @@ void ElectronBrowserMainParts::PreMainMessageLoopRun() {
// Notify observers that main thread message loop was initialized.
Browser::Get()->PreMainMessageLoopRun();
return content::RESULT_CODE_NORMAL_EXIT;
}
bool ElectronBrowserMainParts::MainMessageLoopRun(int* result_code) {

View File

@@ -91,7 +91,7 @@ class ElectronBrowserMainParts : public content::BrowserMainParts {
void PostEarlyInitialization() override;
int PreCreateThreads() override;
void ToolkitInitialized() override;
void PreMainMessageLoopRun() override;
int PreMainMessageLoopRun() override;
bool MainMessageLoopRun(int* result_code) override;
void PreDefaultMainMessageLoopRun(base::OnceClosure quit_closure) override;
void PostMainMessageLoopStart() override;