Merge pull request #7241 from miniak/crashed-killed
Add killed argument for webContents.on("crashed") and app.on("gpu-process-crashed") events
This commit is contained in:
commit
26004f1a66
5 changed files with 17 additions and 6 deletions
|
@ -585,8 +585,9 @@ void App::SelectClientCertificate(
|
||||||
cert_request_info->client_certs[0].get());
|
cert_request_info->client_certs[0].get());
|
||||||
}
|
}
|
||||||
|
|
||||||
void App::OnGpuProcessCrashed(base::TerminationStatus exit_code) {
|
void App::OnGpuProcessCrashed(base::TerminationStatus status) {
|
||||||
Emit("gpu-process-crashed");
|
Emit("gpu-process-crashed",
|
||||||
|
status == base::TERMINATION_STATUS_PROCESS_WAS_KILLED);
|
||||||
}
|
}
|
||||||
|
|
||||||
base::FilePath App::GetPath(mate::Arguments* args, const std::string& name) {
|
base::FilePath App::GetPath(mate::Arguments* args, const std::string& name) {
|
||||||
|
|
|
@ -102,7 +102,7 @@ class App : public AtomBrowserClient::Delegate,
|
||||||
std::unique_ptr<content::ClientCertificateDelegate> delegate) override;
|
std::unique_ptr<content::ClientCertificateDelegate> delegate) override;
|
||||||
|
|
||||||
// content::GpuDataManagerObserver:
|
// content::GpuDataManagerObserver:
|
||||||
void OnGpuProcessCrashed(base::TerminationStatus exit_code) override;
|
void OnGpuProcessCrashed(base::TerminationStatus status) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Get/Set the pre-defined path in PathService.
|
// Get/Set the pre-defined path in PathService.
|
||||||
|
|
|
@ -586,7 +586,7 @@ void WebContents::RenderViewDeleted(content::RenderViewHost* render_view_host) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void WebContents::RenderProcessGone(base::TerminationStatus status) {
|
void WebContents::RenderProcessGone(base::TerminationStatus status) {
|
||||||
Emit("crashed");
|
Emit("crashed", status == base::TERMINATION_STATUS_PROCESS_WAS_KILLED);
|
||||||
}
|
}
|
||||||
|
|
||||||
void WebContents::PluginCrashed(const base::FilePath& plugin_path,
|
void WebContents::PluginCrashed(const base::FilePath& plugin_path,
|
||||||
|
|
|
@ -280,7 +280,12 @@ app.on('login', (event, webContents, request, authInfo, callback) => {
|
||||||
|
|
||||||
### Event: 'gpu-process-crashed'
|
### Event: 'gpu-process-crashed'
|
||||||
|
|
||||||
Emitted when the gpu process crashes.
|
Returns:
|
||||||
|
|
||||||
|
* `event` Event
|
||||||
|
* `killed` Boolean
|
||||||
|
|
||||||
|
Emitted when the gpu process crashes or is killed.
|
||||||
|
|
||||||
### Event: 'accessibility-support-changed' _macOS_ _Windows_
|
### Event: 'accessibility-support-changed' _macOS_ _Windows_
|
||||||
|
|
||||||
|
|
|
@ -203,7 +203,12 @@ are clicked or when the DOM `hashchange` event is triggered.
|
||||||
|
|
||||||
#### Event: 'crashed'
|
#### Event: 'crashed'
|
||||||
|
|
||||||
Emitted when the renderer process has crashed.
|
Returns:
|
||||||
|
|
||||||
|
* `event` Event
|
||||||
|
* `killed` Boolean
|
||||||
|
|
||||||
|
Emitted when the renderer process crashes or is killed.
|
||||||
|
|
||||||
#### Event: 'plugin-crashed'
|
#### Event: 'plugin-crashed'
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue