DescriptionReland: Window.postMessage() to self can cause document leaks
When a script does Window.postMessage() a PostMessageTimer object is
stored in the LocalDOMWindow until the message has been delivered, or
until it is cleared in the destructor of LocalDOMWindow. When a
LocalDOMWindow is reset the remaining messages will not be
delivered. Any PostMessageTimer objects alive at that point will be kept
until the LocalDOMWindow is destroyed. Unfortunately, the
PostMessageTimer objects keeps a reference to the source window. If both
the source and destination window of the message is the same, the
PostMessageTimer can keep that LocalDOMWindow from getting destroyed.
Removing the PostMessageTimers when stop() is invoked fixes the problem.
BUG=500821, 499692
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=197252
Patch Set 1 #
Messages
Total messages: 6 (2 generated)
|