Files
cef/patch/patches/content_mojo_3123.patch
2021-06-11 11:08:25 -04:00

24 lines
962 B
Diff

diff --git content/public/browser/frame_service_base.h content/public/browser/frame_service_base.h
index af3218d8f646..da6880cc57e9 100644
--- content/public/browser/frame_service_base.h
+++ content/public/browser/frame_service_base.h
@@ -83,6 +83,8 @@ class FrameServiceBase : public Interface, public WebContentsObserver {
void DidFinishNavigation(NavigationHandle* navigation_handle) final {
DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
+ if (!ShouldCloseOnFinishNavigation())
+ return;
if (!navigation_handle->HasCommitted() ||
navigation_handle->IsSameDocument() ||
@@ -96,6 +98,9 @@ class FrameServiceBase : public Interface, public WebContentsObserver {
}
}
+ // Used for CEF bindings that outlive navigation.
+ virtual bool ShouldCloseOnFinishNavigation() const { return true; }
+
// Stops observing WebContents and delete |this|.
void Close() {
DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);