Fix #8911
This commit is contained in:
parent
96ca623846
commit
042b511a27
4 changed files with 81 additions and 0 deletions
|
@ -872,6 +872,15 @@ void WebContents::Observe(int type,
|
|||
}
|
||||
}
|
||||
|
||||
void WebContents::BeforeUnloadDialogCancelled() {
|
||||
if (deferred_load_url_.id) {
|
||||
auto& controller = web_contents()->GetController();
|
||||
if (!controller.GetPendingEntry()) {
|
||||
deferred_load_url_.id = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void WebContents::DevToolsReloadPage() {
|
||||
Emit("devtools-reload-page");
|
||||
}
|
||||
|
|
|
@ -340,6 +340,7 @@ class WebContents : public mate::TrackableObject<WebContents>,
|
|||
void Observe(int type,
|
||||
const content::NotificationSource& source,
|
||||
const content::NotificationDetails& details) override;
|
||||
void BeforeUnloadDialogCancelled() override;
|
||||
|
||||
// brightray::InspectableWebContentsDelegate:
|
||||
void DevToolsReloadPage() override;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue