Simplify and weaken DOMWindowProperty unregistration

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
5 files changed
tree: d4aa00baefda0b80d2385f5a3d6ee097ac99c723
  1. third_party/