• dcheng's avatar
    Rewrite how RemoteFrameOwners retain life. · 916fd306
    dcheng authored
    Before out-of-process iframes, frame owners (i.e. HTMLFrameOwnerElement)
    were retained by the DOM tree of the parent frame. However, remote
    frames don't have a DOM tree to keep the frame owners alive. Instead,
    remote frames used a map to keep the frame owners live while the
    corresponding child frame was still in the frame tree.
    
    However, this map was never updated when frames were swapped, so frame
    owners would trivially leak after a frame swap. To simplify the code,
    just eliminate the map and have remote frame owners keep themselves
    live. With Oilpan, there's actually no need to do anything special:
    Frame already has a strong reference to the FrameOwner.
    
    Without Oilpan, it is a bit more complicated: a remote frame owner
    manually refs and unrefs itself when attached to/detached from a content
    frame.
    
    BUG=none
    
    Review URL: https://codereview.chromium.org/1807033003
    
    Cr-Commit-Position: refs/heads/master@{#381717}
    916fd306
RemoteFrameOwner.h 2.34 KB