[webkit-dev] DOMWindow::isCurrentlyDisplayedInFrame does not forbid PostMessageTimer for subframe
chenhao
chenhao at ucweb.com
Wed Sep 3 05:29:49 PDT 2014
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
More information about the webkit-dev
mailing list