-
adachan@apple.com authored
Reviewed by Steve Falkenburg. Add a base class for DOMTimer called SuspendableTimer which captures just the basic functionality of TimerBase and ActiveDOMObject combined. It does not contain functionality specific to scripting timers. SuspendableTimer is used in fixing https://bugs.webkit.org/show_bug.cgi?id=39651 * Android.mk: * CMakeLists.txt: * GNUmakefile.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * page/DOMTimer.cpp: (WebCore::DOMTimer::DOMTimer): (WebCore::DOMTimer::contextDestroyed): (WebCore::DOMTimer::stop): * page/DOMTimer.h: * page/SuspendableTimer.cpp: Added. (WebCore::SuspendableTimer::SuspendableTimer): (WebCore::SuspendableTimer::~SuspendableTimer): (WebCore::SuspendableTimer::hasPendingActivity): (WebCore::SuspendableTimer::stop): (WebCore::SuspendableTimer::suspend): (WebCore::SuspendableTimer::resume): (WebCore::SuspendableTimer::canSuspend): * page/SuspendableTimer.h: Added. WebKit/win: Reviewed by Steve Falkenburg. https://bugs.webkit.org/show_bug.cgi?id=39651 Make m_closeWindowTimer a SuspendableTimer, so it is properly suspended when page loading is deferred. * WebView.cpp: (WebView::WebView): m_closeWindowTimer is now a pointer to a SuspendableTimer. (WindowCloseTimer::create): (WindowCloseTimer::WindowCloseTimer): (WindowCloseTimer::contextDestroyed): Make sure we delete the WindowCloseTimer in the end. (WindowCloseTimer::fired): (WebView::closeWindowSoon): (WebView::closeWindowTimerFired): (WebView::notifyPreferencesChanged): Can just check for the existence m_closeWindowTimer, since we only create it when we need to start the timer. * WebView.h: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@60150 268f45cc-cd09-0410-ab3c-d52691b4dbfc
10c906a4