mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
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:
committed by
Samuel Attard
parent
bfe55a9c68
commit
2622e91c44
@@ -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) {
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user