Hi,

We met one issue related with PostMessageTimer, it may launched while the Page had been moved in Page Cache. After checking the implementation, we doubt this situation should be forbid as below:
void DOMWindow::postMessageTimerFired(PostMessageTimer& timer)
{
    if (!document() || !isCurrentlyDisplayedInFrame())
        return;

But, unfortunately, isCurrentlyDisplayedInFrame() could not work well with sub-frame, because of the sub-frame and its document would be kept same as before moving in Page Cache, that means the judgement return true always for sub-frame.

So, what I want to do is to judge inPageCache() additionally. Just like below:

bool DOMWindow::isCurrentlyDisplayedInFrame() const
{
return m_frame && m_frame->domWindow() == this && !m_frame->document()->inPageCache();
}

That's appreciate to get your comments!

Thanks & Best Regards!
Hao


_______________________________________________
webkit-dev mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-dev

Reply via email to