Remove all event listeners during window's frame destruction step.

Perform the removal of LocalDOMWindow event listeners as part of it being
informed of LocalFrame's destruction (via frameDestroyed()). This is preferable
to waiting until LocalDOMWindow's destructor is run, as it makes the timing of it
independent of when that destructor actually gets to run.

With Oilpan, it is possible that a frame and its window will be swept out without
an explicit frame destruction notification. In that event, a prefinalizing
action is run to take care of the removal.

Additionally, this CL removes an explicit call to reset() from the LocalDOMWindow
destructor. We have since r182337 been asserting that the reset() has already
occurred, without it ever triggering. Time to remove the redundant reset() call.

R=haraken
BUG=340522

Review URL: https://codereview.chromium.org/1017043002

git-svn-id: svn://svn.chromium.org/blink/trunk@192149 bbb929c8-8fbe-4397-9dbb-9b2b20218538
3 files changed
tree: bdec85f1212408e5d0e64d5367e9143c1f76d032
  1. third_party/