• sigbjornf@opera.com's avatar
    Simplify and weaken DOMWindowProperty unregistration · 04e5fb3b
    sigbjornf@opera.com authored
    A DOMWindowProperty object should not be kept alive if it is only
    referenced from a LocalDOMWindow's set of registered DOMWindowProperty
    objects. Adjust LocalDOMWindow's DOMObjectProperty references to be 
    weak for Oilpan also.
    
    In most cases, DOMWindowProperty objects will remain alive for at least
    as long as their associated LocalDOMWindow, but this cannot be assumed.
    The added test checks for that wrt DOMSelection objects created from
    shadow roots.
    
    Along with adjusting the weakness of these references, simplify
    how LocalDOMWindow unregisters its DOMWindowProperty objects. That is,
    no longer have the instances unregister themselves, but let the
    LocalDOMWindow remove them all after having notified them of impending
    destruction.
    
    R=haraken,ager
    BUG=413316
    
    Review URL: https://codereview.chromium.org/569643002
    
    git-svn-id: svn://svn.chromium.org/blink/trunk@181970 bbb929c8-8fbe-4397-9dbb-9b2b20218538
    04e5fb3b
shadow-selection-detach-crash.html 778 Bytes