Skip to content

Commit daeb0e2

Browse files
author
Cong Liu
committed
Log termination status for render process
Sometime render process was gone for some reason. This fix log the termination status for render process. * [NW.JS]RenderProcessCrashed: for render process exit with code > 1 * [NW.JS]RenderProcessWasKilled: for render process exit with code = 1
1 parent 0f419d8 commit daeb0e2

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/api/dispatcher_host.cc

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,17 @@ void DispatcherHost::RenderViewDeleted(content::RenderViewHost* host) {
146146
}
147147

148148
void DispatcherHost::RenderProcessGone(base::TerminationStatus status) {
149+
switch(status) {
150+
case base::TerminationStatus::TERMINATION_STATUS_PROCESS_CRASHED:
151+
LOG(INFO) << "[NW.JS]RenderProcessCrashed";
152+
break;
153+
case base::TerminationStatus::TERMINATION_STATUS_PROCESS_WAS_KILLED:
154+
LOG(INFO) << "[NW.JS]RenderProcessWasKilled";
155+
break;
156+
default:
157+
LOG(INFO) << "[NW.JS]RenderProcessGone";
158+
break;
159+
}
149160
delete this;
150161
}
151162

0 commit comments

Comments
 (0)