Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(309)

Unified Diff: headless/app/headless_shell.cc

Issue 2509813006: HeadlessWebContents:Observer to observe render process exit status (Closed)
Patch Set: Added a comment Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | headless/lib/browser/headless_devtools_client_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: headless/app/headless_shell.cc
diff --git a/headless/app/headless_shell.cc b/headless/app/headless_shell.cc
index b57fc5f9070de1e36aa9bfb743c76945ef53ca64..d9c6c23a89355924627ec53ee617a0bdf67e30ed 100644
--- a/headless/app/headless_shell.cc
+++ b/headless/app/headless_shell.cc
@@ -159,6 +159,18 @@ class HeadlessShell : public HeadlessWebContents::Observer,
// TODO(skyostil): Implement more features to demonstrate the devtools API.
}
+ void RenderProcessExited(base::TerminationStatus status,
+ int exit_code) override {
+ if (status == base::TERMINATION_STATUS_NORMAL_TERMINATION)
+ return;
+
+ LOG(ERROR) << "Abnormal renderer termination.";
+ web_contents_->RemoveObserver(this);
altimin 2016/11/18 14:36:45 Looks like we do not detail devtools observers her
alex clarke (OOO till 29th) 2016/11/18 14:59:38 I had to figure out why it was crashing. That's (m
+ web_contents_ = nullptr;
+ browser_context_->Close();
+ browser_->Shutdown();
+ }
+
void PollReadyState() {
// We need to check the current location in addition to the ready state to
// be sure the expected page is ready.
« no previous file with comments | « no previous file | headless/lib/browser/headless_devtools_client_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698