mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Improve timing of frame attach/detach (see #3664)
- Move frame attachment from RenderFrameCreated to DidCommitProvisionalLoad. This has a number of advantages: - Significantly reduces the frequency of disconnects by avoiding the GetInterface/DidCommitNavigation race condition. - Stops connecting temporary frames (created during cross-origin navigation), making callback behavior more consistent. - Split frame detach and destruction notifications into separate callbacks. OnFrameDetached now reflects a potentially recoverable state. Add a new OnFrameDestroyed callback for the unrecoverable destruction state.
This commit is contained in:
@ -69,7 +69,10 @@ class CefFrameServiceBase : public Interface,
|
||||
DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
|
||||
|
||||
if (render_frame_host == render_frame_host_) {
|
||||
DVLOG(1) << __func__ << ": RenderFrameHost destroyed.";
|
||||
DVLOG(1) << __func__ << ": "
|
||||
<< frame_util::GetFrameDebugString(
|
||||
render_frame_host->GetGlobalFrameToken())
|
||||
<< " destroyed";
|
||||
if (receiver_.is_bound()) {
|
||||
receiver_.ResetWithReason(
|
||||
static_cast<uint32_t>(frame_util::ResetReason::kDeleted),
|
||||
|
Reference in New Issue
Block a user