Skip to content

Commit

Permalink
Revert "fix: DCHECK on reload when forcefullyCrashRenderer() is called (
Browse files Browse the repository at this point in the history
#30544)" (#30646)

This reverts commit 90b5ba3.
  • Loading branch information
MarshallOfSound committed Aug 19, 2021
1 parent aab5ea5 commit c83de75
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
4 changes: 2 additions & 2 deletions shell/browser/electron_browser_client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -951,9 +951,9 @@ void ElectronBrowserClient::RenderProcessReady(
void ElectronBrowserClient::RenderProcessExited(
content::RenderProcessHost* host,
const content::ChildProcessTerminationInfo& info) {
if (delegate_)
if (delegate_) {
static_cast<api::App*>(delegate_)->RenderProcessExited(host);
host->RemoveObserver(this);
}
}

void OnOpenExternal(const GURL& escaped_url, bool allowed) {
Expand Down
7 changes: 0 additions & 7 deletions spec-main/api-web-contents-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1330,13 +1330,6 @@ describe('webContents module', () => {
w.webContents.reload();
expect(w.webContents.isCrashed()).to.equal(false);
});

it('does not crash when a new page is loaded after forcefullyCrashRenderer()', async () => {
expect(w.webContents.isCrashed()).to.equal(false);
w.webContents.forcefullyCrashRenderer();
await w.loadFile(path.join(fixturesPath, 'pages', 'base-page.html'));
expect(w.webContents.isCrashed()).to.equal(false);
});
});
}

Expand Down

0 comments on commit c83de75

Please sign in to comment.