• Lukasz Anforowicz's avatar
    Clear FocusController::focused_frame_ when RemoteFrame is detached. · 03a0497e
    Lukasz Anforowicz authored
    Before this CL, after RemoteFrame is detached, it would be kept alive
    by FocusController::focused_frame_.
    
    Before this CL, LocalFrame::DetachImpl would clear
    FocusController::focused_frame_ if needed.  After this CL this is done
    from Frame::Detach (and so covers both LocalFrame and RemoteFrame).
    
    Before and after this CL, FocusController::focused_frame_ stores
    either a LocalFrame or RemoteFrame, but FocusController::FocusedFrame
    only exposes LocalFrame.  This CL preserves this approach of handling
    RemoteFrame internally within FocusController, by introducing
    FocusController::FrameDetached(Frame* detached_frame) method
    which can directly compare |detached_frame| with |focused_frame_|
    (without going through local-vs-remote considerations and/or casts).
    
    Bug: 906809
    Change-Id: I47f3a725db87f3a887ad96c7a4739b4fc02496ed
    Reviewed-on: https://chromium-review.googlesource.com/c/1344254
    Commit-Queue: Łukasz Anforowicz <lukasza@chromium.org>
    Reviewed-by: default avatarDaniel Cheng <dcheng@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#609870}
    03a0497e
LeakExpectations 5.78 KB