feat: add error event for utility process (33-x-y) (#43997)
* feat: add error event for utility process (#43774)
* feat: add error event for utility process
* chore: use public report api
* chore: fix lint
* doc: mark error event as experimental
---------
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
* fixup! feat: add error event for utility process (#43774)
remove #include "electron/mas.h"
this header did not exist before c1c8fbfd9
---------
Co-authored-by: Robo <hop2deep@gmail.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
This commit is contained in:
parent
d8cd86c4fa
commit
5836ea1a78
16 changed files with 166 additions and 5 deletions
|
@ -223,7 +223,8 @@ UtilityProcessWrapper::UtilityProcessWrapper(
|
|||
params->use_network_observer_from_url_loader_factory =
|
||||
create_network_observer;
|
||||
|
||||
node_service_remote_->Initialize(std::move(params));
|
||||
node_service_remote_->Initialize(std::move(params),
|
||||
receiver_.BindNewPipeAndPassRemote());
|
||||
}
|
||||
|
||||
UtilityProcessWrapper::~UtilityProcessWrapper() {
|
||||
|
@ -258,8 +259,9 @@ void UtilityProcessWrapper::HandleTermination(uint64_t exit_code) {
|
|||
void UtilityProcessWrapper::OnServiceProcessDisconnected(
|
||||
uint32_t exit_code,
|
||||
const std::string& description) {
|
||||
if (description == "process_exit_termination")
|
||||
if (description == "process_exit_termination") {
|
||||
HandleTermination(exit_code);
|
||||
}
|
||||
}
|
||||
|
||||
void UtilityProcessWrapper::OnServiceProcessTerminatedNormally(
|
||||
|
@ -372,6 +374,11 @@ bool UtilityProcessWrapper::Accept(mojo::Message* mojo_message) {
|
|||
return true;
|
||||
}
|
||||
|
||||
void UtilityProcessWrapper::OnV8FatalError(const std::string& location,
|
||||
const std::string& report) {
|
||||
EmitWithoutEvent("error", "FatalError", location, report);
|
||||
}
|
||||
|
||||
// static
|
||||
raw_ptr<UtilityProcessWrapper> UtilityProcessWrapper::FromProcessId(
|
||||
base::ProcessId pid) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue