DescriptionWindow.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=
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=196930
Patch Set 1 #Patch Set 2 : Remove PostMessageTimers when stopped #
Total comments: 2
Patch Set 3 : Let PostMessageTimer be in charge of its own destruction #Patch Set 4 : Add layout test #
Total comments: 6
Patch Set 5 : Fix review issues #Patch Set 6 : Rebase to master #
Messages
Total messages: 20 (4 generated)
|