Update guest process id when navigating
This commit is contained in:
parent
d8adbc0875
commit
36c4b1705d
3 changed files with 46 additions and 10 deletions
|
@ -151,11 +151,21 @@ void AtomBrowserClient::AppendExtraCommandLineSwitches(
|
|||
// uses the old going-to-be-swapped render process, then we try to find the
|
||||
// window from the swapped render process.
|
||||
if (!window && dying_render_process_) {
|
||||
child_process_id = dying_render_process_->GetID();
|
||||
int dying_process_id = dying_render_process_->GetID();
|
||||
WindowList::const_iterator iter = std::find_if(
|
||||
list->begin(), list->end(), FindByProcessId(child_process_id));
|
||||
if (iter != list->end())
|
||||
list->begin(), list->end(), FindByProcessId(dying_process_id));
|
||||
if (iter != list->end()) {
|
||||
window = *iter;
|
||||
child_process_id = dying_process_id;
|
||||
} else {
|
||||
// It appears that the dying process doesn't belong to a BrowserWindow,
|
||||
// then it must be a guest process, we should update its process ID in the
|
||||
// WebViewManager here.
|
||||
auto child_process = content::RenderProcessHost::FromID(child_process_id);
|
||||
// Update the process ID in webview guests.
|
||||
WebViewManager::UpdateGuestProcessID(dying_render_process_,
|
||||
child_process);
|
||||
}
|
||||
}
|
||||
|
||||
if (window) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue