Commit b6fe2305 authored by andersca@apple.com's avatar andersca@apple.com

CTTE Timer and DeferrableOneShotTimer

https://bugs.webkit.org/show_bug.cgi?id=126814

Reviewed by Antti Koivisto.

Add new Timer and DeferrableOneShotTimer constructors whose member function pointers
take a reference instead of a pointer.
Also, convert a bunch of classes over to using these new constructors.

* Modules/encryptedmedia/MediaKeySession.cpp:
(WebCore::MediaKeySession::keyRequestTimerFired):
(WebCore::MediaKeySession::addKeyTimerFired):
* Modules/encryptedmedia/MediaKeySession.h:
* Modules/geolocation/Geolocation.cpp:
(WebCore::Geolocation::GeoNotifier::timerFired):
(WebCore::Geolocation::resumeTimerFired):
* Modules/geolocation/Geolocation.h:
* Modules/indexeddb/IDBTransactionBackend.cpp:
(WebCore::IDBTransactionBackend::taskTimerFired):
* Modules/indexeddb/IDBTransactionBackend.h:
* Modules/mediasource/SourceBuffer.cpp:
(WebCore::SourceBuffer::appendBufferTimerFired):
* Modules/mediasource/SourceBuffer.h:
* Modules/notifications/Notification.cpp:
(WebCore::Notification::taskTimerFired):
* Modules/notifications/Notification.h:
* Modules/notifications/NotificationCenter.cpp:
(WebCore::NotificationCenter::NotificationRequestCallback::timerFired):
* Modules/notifications/NotificationCenter.h:
* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::notificationPostTimerFired):
* accessibility/AXObjectCache.h:
* css/CSSFontSelector.cpp:
(WebCore::CSSFontSelector::beginLoadTimerFired):
* css/CSSFontSelector.h:
* css/CSSImageGeneratorValue.cpp:
(WebCore::CSSImageGeneratorValue::CachedGeneratedImage::evictionTimerFired):
* css/CSSImageGeneratorValue.h:
* dom/Document.cpp:
(WebCore::Document::visualUpdatesSuppressionTimerFired):
(WebCore::Document::styleRecalcTimerFired):
(WebCore::Document::optimizedStyleSheetUpdateTimerFired):
(WebCore::Document::sharedObjectPoolClearTimerFired):
(WebCore::Document::styleResolverThrowawayTimerFired):
(WebCore::Document::updateFocusAppearanceTimerFired):
(WebCore::Document::resetHiddenFocusElementTimer):
(WebCore::Document::pendingTasksTimerFired):
(WebCore::Document::fullScreenChangeDelayTimerFired):
(WebCore::Document::loadEventDelayTimerFired):
(WebCore::Document::didAssociateFormControlsTimerFired):
* dom/Document.h:
* dom/EventSender.h:
(WebCore::EventSender::timerFired):
* dom/GenericEventQueue.cpp:
(WebCore::GenericEventQueue::timerFired):
* dom/GenericEventQueue.h:
* dom/ScriptRunner.cpp:
(WebCore::ScriptRunner::timerFired):
* dom/ScriptRunner.h:
* dom/ScriptedAnimationController.cpp:
(WebCore::ScriptedAnimationController::animationTimerFired):
* dom/ScriptedAnimationController.h:
* editing/AlternativeTextController.cpp:
(WebCore::AlternativeTextController::timerFired):
* editing/AlternativeTextController.h:
* editing/FrameSelection.cpp:
(WebCore::FrameSelection::caretBlinkTimerFired):
* editing/FrameSelection.h:
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::parseAttribute):
* html/HTMLMediaElement.h:
* html/HTMLPlugInElement.cpp:
(WebCore::HTMLPlugInElement::swapRendererTimerFired):
* html/HTMLPlugInElement.h:
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::removeSnapshotTimerFired):
(WebCore::HTMLPlugInImageElement::simulatedMouseClickTimerFired):
* html/HTMLPlugInImageElement.h:
* html/HTMLSourceElement.cpp:
(WebCore::HTMLSourceElement::errorEventTimerFired):
* html/HTMLSourceElement.h:
* html/HTMLTrackElement.cpp:
(WebCore::HTMLTrackElement::loadTimerFired):
* html/HTMLTrackElement.h:
* html/MediaController.cpp:
(MediaController::asyncEventTimerFired):
(MediaController::clearPositionTimerFired):
(MediaController::timeupdateTimerFired):
* html/MediaController.h:
* html/MediaDocument.cpp:
(WebCore::MediaDocument::replaceMediaElementTimerFired):
* html/MediaDocument.h:
* html/parser/HTMLParserScheduler.cpp:
(WebCore::HTMLParserScheduler::continueNextChunkTimerFired):
* html/parser/HTMLParserScheduler.h:
* html/shadow/MediaControlElementTypes.cpp:
(WebCore::MediaControlSeekButtonElement::seekTimerFired):
* html/shadow/MediaControlElementTypes.h:
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlPanelElement::transitionTimerFired):
(WebCore::MediaControlTextTrackContainerElement::updateTimerFired):
* html/shadow/MediaControlElements.h:
* html/shadow/MediaControls.cpp:
(WebCore::MediaControls::hideFullscreenControlsTimerFired):
* html/shadow/MediaControls.h:
* html/track/LoadableTextTrack.cpp:
(WebCore::LoadableTextTrack::loadTimerFired):
* html/track/LoadableTextTrack.h:
* inspector/InspectorCSSAgent.cpp:
(WebCore::UpdateRegionLayoutTask::UpdateRegionLayoutTask):
(WebCore::UpdateRegionLayoutTask::timerFired):
(WebCore::ChangeRegionOversetTask::ChangeRegionOversetTask):
(WebCore::ChangeRegionOversetTask::timerFired):
* inspector/InspectorDOMAgent.cpp:
(WebCore::RevalidateStyleAttributeTask::RevalidateStyleAttributeTask):
(WebCore::RevalidateStyleAttributeTask::timerFired):
* inspector/InspectorFrontendClientLocal.cpp:
(WebCore::InspectorBackendDispatchTask::InspectorBackendDispatchTask):
(WebCore::InspectorBackendDispatchTask::timerFired):
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::substituteResourceDeliveryTimerFired):
* loader/DocumentLoader.h:
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::checkTimerFired):
* loader/FrameLoader.h:
* loader/ImageLoader.cpp:
(WebCore::ImageLoader::timerFired):
* loader/ImageLoader.h:
* loader/LinkLoader.cpp:
(WebCore::LinkLoader::linkLoadTimerFired):
(WebCore::LinkLoader::linkLoadingErrorTimerFired):
* loader/LinkLoader.h:
* loader/NavigationScheduler.cpp:
(WebCore::NavigationScheduler::timerFired):
* loader/NavigationScheduler.h:
* loader/PingLoader.cpp:
(WebCore::PingLoader::PingLoader):
* loader/PingLoader.h:
(WebCore::PingLoader::timeoutTimerFired):
* loader/ProgressTracker.cpp:
(WebCore::ProgressTracker::progressHeartbeatTimerFired):
* loader/ProgressTracker.h:
* loader/ResourceLoadScheduler.cpp:
(WebCore::ResourceLoadScheduler::requestTimerFired):
* loader/ResourceLoadScheduler.h:
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::decodedDataDeletionTimerFired):
(WebCore::CachedResource::CachedResourceCallback::timerFired):
* loader/cache/CachedResource.h:
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::garbageCollectDocumentResourcesTimerFired):
* loader/cache/CachedResourceLoader.h:
* loader/icon/IconDatabase.cpp:
(WebCore::IconDatabase::syncTimerFired):
* loader/icon/IconDatabase.h:
* page/AutoscrollController.cpp:
(WebCore::AutoscrollController::autoscrollTimerFired):
* page/AutoscrollController.h:
* page/CaptionUserPreferences.cpp:
(WebCore::CaptionUserPreferences::timerFired):
* page/CaptionUserPreferences.h:
* page/DeviceController.cpp:
(WebCore::DeviceController::fireDeviceEvent):
* page/DeviceController.h:
* page/EventHandler.cpp:
(WebCore::EventHandler::cursorUpdateTimerFired):
(WebCore::EventHandler::autoHideCursorTimerFired):
(WebCore::EventHandler::fakeMouseMoveEventTimerFired):
(WebCore::EventHandler::hoverTimerFired):
* page/EventHandler.h:
* page/EventSource.cpp:
(WebCore::EventSource::connectTimerFired):
* page/EventSource.h:
* page/FrameView.cpp:
(WebCore::FrameView::deferredRepaintTimerFired):
(WebCore::FrameView::layoutTimerFired):
(WebCore::FrameView::postLayoutTimerFired):
* page/FrameView.h:
* page/PageThrottler.cpp:
(WebCore::PageThrottler::throttleHysteresisTimerFired):
* page/PageThrottler.h:
* page/animation/AnimationController.cpp:
(WebCore::AnimationControllerPrivate::updateStyleIfNeededDispatcherFired):
(WebCore::AnimationControllerPrivate::animationTimerFired):
* page/animation/AnimationControllerPrivate.h:
* platform/Scrollbar.cpp:
(WebCore::Scrollbar::autoscrollTimerFired):
* platform/Scrollbar.h:
* platform/Timer.h:
(WebCore::Timer::Timer):
(WebCore::DeferrableOneShotTimer::DeferrableOneShotTimer):
* platform/graphics/BitmapImage.cpp:
(WebCore::BitmapImage::advanceAnimation):
* platform/graphics/BitmapImage.h:
* platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::reloadTimerFired):
* platform/graphics/MediaPlayer.h:
* platform/graphics/ca/mac/LayerPool.h:
* platform/graphics/ca/mac/LayerPool.mm:
(WebCore::LayerPool::pruneTimerFired):
* platform/graphics/cg/ImageBufferBackingStoreCache.cpp:
(WebCore::ImageBufferBackingStoreCache::timerFired):
* platform/graphics/cg/ImageBufferBackingStoreCache.h:
* platform/graphics/cg/SubimageCacheWithTimer.cpp:
(WebCore::SubimageCacheWithTimer::invalidateCacheTimerFired):
* platform/graphics/cg/SubimageCacheWithTimer.h:
* platform/graphics/mac/MediaPlayerPrivateQTKit.h:
* platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
(WebCore::MediaPlayerPrivateQTKit::seekTimerFired):
* platform/mac/ScrollAnimatorMac.h:
* platform/mac/ScrollAnimatorMac.mm:
(WebCore::ScrollAnimatorMac::snapRubberBandTimerFired):
(WebCore::ScrollAnimatorMac::initialScrollbarPaintTimerFired):
(WebCore::ScrollAnimatorMac::sendContentAreaScrolledTimerFired):
* platform/mock/DeviceOrientationClientMock.cpp:
(WebCore::DeviceOrientationClientMock::timerFired):
* platform/mock/DeviceOrientationClientMock.h:
* platform/network/NetworkStateNotifier.h:
* platform/network/ResourceHandle.cpp:
(WebCore::ResourceHandle::failureTimerFired):
* platform/network/ResourceHandle.h:
* platform/network/ResourceHandleInternal.h:
(WebCore::ResourceHandleInternal::ResourceHandleInternal):
* platform/network/mac/NetworkStateNotifierMac.cpp:
(WebCore::NetworkStateNotifier::networkStateChangeTimerFired):
* rendering/ImageQualityController.cpp:
(WebCore::ImageQualityController::highQualityRepaintTimerFired):
* rendering/ImageQualityController.h:
* rendering/RenderButton.cpp:
(WebCore::RenderButton::timerFired):
* rendering/RenderButton.h:
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateCompositingLayersTimerFired):
(WebCore::RenderLayerCompositor::layerFlushTimerFired):
(WebCore::RenderLayerCompositor::paintRelatedMilestonesTimerFired):
* rendering/RenderLayerCompositor.h:
* rendering/RenderMarquee.cpp:
(WebCore::RenderMarquee::timerFired):
* rendering/RenderMarquee.h:
* rendering/RenderNamedFlowThread.cpp:
(WebCore::RenderNamedFlowThread::regionLayoutUpdateEventTimerFired):
(WebCore::RenderNamedFlowThread::regionOversetChangeEventTimerFired):
* rendering/RenderNamedFlowThread.h:
* rendering/RenderProgress.cpp:
(WebCore::RenderProgress::animationTimerFired):
* rendering/RenderProgress.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161768 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 3e370f74
This diff is collapsed.
......@@ -82,7 +82,7 @@ void MediaKeySession::generateKeyRequest(const String& mimeType, Uint8Array* ini
m_keyRequestTimer.startOneShot(0);
}
void MediaKeySession::keyRequestTimerFired(Timer<MediaKeySession>*)
void MediaKeySession::keyRequestTimerFired(Timer<MediaKeySession>&)
{
ASSERT(m_pendingKeyRequests.size());
if (!m_session)
......@@ -154,7 +154,7 @@ void MediaKeySession::update(Uint8Array* key, ExceptionCode& ec)
m_addKeyTimer.startOneShot(0);
}
void MediaKeySession::addKeyTimerFired(Timer<MediaKeySession>*)
void MediaKeySession::addKeyTimerFired(Timer<MediaKeySession>&)
{
ASSERT(m_pendingKeys.size());
if (!m_session)
......
......@@ -77,8 +77,8 @@ public:
protected:
MediaKeySession(ScriptExecutionContext*, MediaKeys*, const String& keySystem);
void keyRequestTimerFired(Timer<MediaKeySession>*);
void addKeyTimerFired(Timer<MediaKeySession>*);
void keyRequestTimerFired(Timer<MediaKeySession>&);
void addKeyTimerFired(Timer<MediaKeySession>&);
MediaKeys* m_keys;
String m_keySystem;
......
......@@ -142,7 +142,7 @@ void Geolocation::GeoNotifier::stopTimer()
m_timer.stop();
}
void Geolocation::GeoNotifier::timerFired(Timer<GeoNotifier>*)
void Geolocation::GeoNotifier::timerFired(Timer<GeoNotifier>&)
{
m_timer.stop();
......@@ -297,7 +297,7 @@ void Geolocation::resume()
m_resumeTimer.startOneShot(0);
}
void Geolocation::resumeTimerFired(Timer<Geolocation>*)
void Geolocation::resumeTimerFired(Timer<Geolocation>&)
{
m_isSuspended = false;
......
......@@ -100,7 +100,7 @@ private:
void startTimerIfNeeded();
void stopTimer();
void timerFired(Timer<GeoNotifier>*);
void timerFired(Timer<GeoNotifier>&);
bool hasZeroTimeout() const;
private:
......@@ -186,7 +186,7 @@ private:
bool m_hasChangedPosition;
RefPtr<PositionError> m_errorWaitingForResume;
void resumeTimerFired(Timer<Geolocation>*);
void resumeTimerFired(Timer<Geolocation>&);
Timer<Geolocation> m_resumeTimer;
#endif // PLATFORM(IOS)
......
......@@ -256,7 +256,7 @@ void IDBTransactionBackend::commit()
});
}
void IDBTransactionBackend::taskTimerFired(Timer<IDBTransactionBackend>*)
void IDBTransactionBackend::taskTimerFired(Timer<IDBTransactionBackend>&)
{
LOG(StorageAPI, "IDBTransactionBackend::taskTimerFired");
......
......@@ -96,7 +96,7 @@ private:
bool isTaskQueueEmpty() const;
bool hasPendingTasks() const;
void taskTimerFired(Timer<IDBTransactionBackend>*);
void taskTimerFired(Timer<IDBTransactionBackend>&);
void closeOpenCursors();
const HashSet<int64_t> m_objectStoreIds;
......
......@@ -397,7 +397,7 @@ void SourceBuffer::appendBufferInternal(unsigned char* data, unsigned size, Exce
m_appendBufferTimer.startOneShot(0);
}
void SourceBuffer::appendBufferTimerFired(Timer<SourceBuffer>*)
void SourceBuffer::appendBufferTimerFired(Timer<SourceBuffer>&)
{
ASSERT(m_updating);
......
......@@ -134,7 +134,7 @@ private:
void scheduleEvent(const AtomicString& eventName);
void appendBufferInternal(unsigned char*, unsigned, ExceptionCode&);
void appendBufferTimerFired(Timer<SourceBuffer>*);
void appendBufferTimerFired(Timer<SourceBuffer>&);
void setActive(bool);
......
......@@ -201,10 +201,10 @@ void Notification::dispatchErrorEvent()
}
#if ENABLE(NOTIFICATIONS)
void Notification::taskTimerFired(Timer<Notification>* timer)
void Notification::taskTimerFired(Timer<Notification>& timer)
{
ASSERT(scriptExecutionContext()->isDocument());
ASSERT_UNUSED(timer, timer == m_taskTimer.get());
ASSERT_UNUSED(timer, &timer == m_taskTimer.get());
show();
}
#endif
......
......@@ -159,7 +159,7 @@ private:
void finishLoadingIcon();
#if ENABLE(NOTIFICATIONS)
void taskTimerFired(Timer<Notification>*);
void taskTimerFired(Timer<Notification>&);
#endif
// Text notifications.
......
......@@ -129,7 +129,7 @@ void NotificationCenter::NotificationRequestCallback::startTimer()
m_timer.startOneShot(0);
}
void NotificationCenter::NotificationRequestCallback::timerFired(Timer<NotificationCenter::NotificationRequestCallback>*)
void NotificationCenter::NotificationRequestCallback::timerFired(Timer<NotificationCenter::NotificationRequestCallback>&)
{
if (m_callback)
m_callback->handleEvent();
......
......@@ -81,7 +81,7 @@ private:
public:
static PassRefPtr<NotificationRequestCallback> createAndStartTimer(NotificationCenter*, PassRefPtr<VoidCallback>);
void startTimer();
void timerFired(Timer<NotificationRequestCallback>*);
void timerFired(Timer<NotificationRequestCallback>&);
private:
NotificationRequestCallback(NotificationCenter*, PassRefPtr<VoidCallback>);
......
......@@ -638,7 +638,7 @@ void AXObjectCache::childrenChanged(AccessibilityObject* obj)
obj->childrenChanged();
}
void AXObjectCache::notificationPostTimerFired(Timer<AXObjectCache>*)
void AXObjectCache::notificationPostTimerFired(Timer<AXObjectCache>&)
{
Ref<Document> protectorForCacheOwner(m_document);
......
......@@ -236,7 +236,7 @@ private:
Timer<AXObjectCache> m_notificationPostTimer;
Vector<std::pair<RefPtr<AccessibilityObject>, AXNotification>> m_notificationsToPost;
void notificationPostTimerFired(Timer<AXObjectCache>*);
void notificationPostTimerFired(Timer<AXObjectCache>&);
static AccessibilityObject* focusedImageMapUIElement(HTMLAreaElement*);
......
......@@ -590,7 +590,7 @@ void CSSFontSelector::beginLoadingFontSoon(CachedFont* font)
m_beginLoadingTimer.startOneShot(0);
}
void CSSFontSelector::beginLoadTimerFired(Timer<WebCore::CSSFontSelector>*)
void CSSFontSelector::beginLoadTimerFired(Timer<WebCore::CSSFontSelector>&)
{
Vector<CachedResourceHandle<CachedFont>> fontsToBeginLoading;
fontsToBeginLoading.swap(m_fontsToBeginLoading);
......
......@@ -85,7 +85,7 @@ private:
void dispatchInvalidationCallbacks();
void beginLoadTimerFired(Timer<CSSFontSelector>*);
void beginLoadTimerFired(Timer<CSSFontSelector>&);
Document* m_document;
HashMap<String, OwnPtr<Vector<RefPtr<CSSFontFace>>>, CaseFoldingHash> m_fontFaces;
......
......@@ -99,7 +99,7 @@ CSSImageGeneratorValue::CachedGeneratedImage::CachedGeneratedImage(CSSImageGener
m_evictionTimer.restart();
}
void CSSImageGeneratorValue::CachedGeneratedImage::evictionTimerFired(DeferrableOneShotTimer<CachedGeneratedImage>*)
void CSSImageGeneratorValue::CachedGeneratedImage::evictionTimerFired(DeferrableOneShotTimer<CachedGeneratedImage>&)
{
// NOTE: This is essentially a "delete this", the object is no longer valid after this line.
m_owner.evictCachedGeneratedImage(m_size);
......
......@@ -76,7 +76,7 @@ private:
void puntEvictionTimer() { m_evictionTimer.restart(); }
private:
void evictionTimerFired(DeferrableOneShotTimer<CachedGeneratedImage>*);
void evictionTimerFired(DeferrableOneShotTimer<CachedGeneratedImage>&);
CSSImageGeneratorValue& m_owner;
IntSize m_size;
......
......@@ -1251,7 +1251,7 @@ void Document::setVisualUpdatesAllowed(bool visualUpdatesAllowed)
frame->loader().forcePageTransitionIfNeeded();
}
void Document::visualUpdatesSuppressionTimerFired(Timer<Document>*)
void Document::visualUpdatesSuppressionTimerFired(Timer<Document>&)
{
ASSERT(!m_visualUpdatesAllowed);
......@@ -1698,7 +1698,7 @@ bool Document::hasPendingForcedStyleRecalc() const
return m_styleRecalcTimer.isActive() && m_pendingStyleRecalcShouldForce;
}
void Document::styleRecalcTimerFired(Timer<Document>*)
void Document::styleRecalcTimerFired(Timer<Document>&)
{
updateStyleIfNeeded();
}
......@@ -3178,7 +3178,7 @@ void Document::evaluateMediaQueryList()
m_mediaQueryMatcher->styleResolverChanged();
}
void Document::optimizedStyleSheetUpdateTimerFired(Timer<Document>*)
void Document::optimizedStyleSheetUpdateTimerFired(Timer<Document>&)
{
styleResolverChanged(RecalcStyleIfNeeded);
}
......@@ -4462,7 +4462,7 @@ void Document::finishedParsing()
m_cachedResourceLoader->clearPreloads();
}
void Document::sharedObjectPoolClearTimerFired(Timer<Document>*)
void Document::sharedObjectPoolClearTimerFired(Timer<Document>&)
{
m_sharedObjectPool.clear();
}
......@@ -4472,7 +4472,7 @@ void Document::didAccessStyleResolver()
m_styleResolverThrowawayTimer.restart();
}
void Document::styleResolverThrowawayTimerFired(DeferrableOneShotTimer<Document>*)
void Document::styleResolverThrowawayTimerFired(DeferrableOneShotTimer<Document>&)
{
ASSERT(!m_inStyleRecalc);
clearStyleResolver();
......@@ -4736,7 +4736,7 @@ void Document::resetHiddenFocusElementSoon()
m_resetHiddenFocusElementTimer.startOneShot(0);
}
void Document::updateFocusAppearanceTimerFired(Timer<Document>*)
void Document::updateFocusAppearanceTimerFired(Timer<Document>&)
{
Element* element = focusedElement();
if (!element)
......@@ -4747,7 +4747,7 @@ void Document::updateFocusAppearanceTimerFired(Timer<Document>*)
element->updateFocusAppearance(m_updateFocusAppearanceRestoresSelection);
}
void Document::resetHiddenFocusElementTimer(Timer<Document>*)
void Document::resetHiddenFocusElementTimer(Timer<Document>&)
{
if (view() && view()->needsLayout())
return;
......@@ -4917,7 +4917,7 @@ void Document::postTask(PassOwnPtr<Task> task)
callOnMainThread(didReceiveTask, new PerformTaskContext(m_weakFactory.createWeakPtr(), task));
}
void Document::pendingTasksTimerFired(Timer<Document>*)
void Document::pendingTasksTimerFired(Timer<Document>&)
{
while (!m_pendingTasks.isEmpty()) {
OwnPtr<Task> task = m_pendingTasks[0].release();
......@@ -5435,7 +5435,7 @@ void Document::fullScreenRendererDestroyed()
m_fullScreenRenderer = nullptr;
}
void Document::fullScreenChangeDelayTimerFired(Timer<Document>*)
void Document::fullScreenChangeDelayTimerFired(Timer<Document>&)
{
// Since we dispatch events in this function, it's possible that the
// document will be detached and GC'd. We protect it here to make sure we
......@@ -5573,7 +5573,7 @@ void Document::decrementLoadEventDelayCount()
m_loadEventDelayTimer.startOneShot(0);
}
void Document::loadEventDelayTimerFired(Timer<Document>*)
void Document::loadEventDelayTimerFired(Timer<Document>&)
{
if (frame())
frame()->loader().checkCompleted();
......@@ -6081,9 +6081,10 @@ void Document::didAssociateFormControl(Element* element)
m_didAssociateFormControlsTimer.startOneShot(0);
}
void Document::didAssociateFormControlsTimerFired(Timer<Document>* timer)
void Document::didAssociateFormControlsTimerFired(Timer<Document>& timer)
{
ASSERT_UNUSED(timer, timer == &m_didAssociateFormControlsTimer);
ASSERT_UNUSED(timer, &timer == &m_didAssociateFormControlsTimer);
if (!frame() || !frame()->page())
return;
......
......@@ -716,8 +716,8 @@ public:
void unscheduleStyleRecalc();
bool hasPendingStyleRecalc() const;
bool hasPendingForcedStyleRecalc() const;
void styleRecalcTimerFired(Timer<Document>*);
void optimizedStyleSheetUpdateTimerFired(Timer<Document>*);
void styleRecalcTimerFired(Timer<Document>&);
void optimizedStyleSheetUpdateTimerFired(Timer<Document>&);
void registerNodeList(LiveNodeList&);
void unregisterNodeList(LiveNodeList&);
......@@ -1089,7 +1089,7 @@ public:
RenderFullScreen* fullScreenRenderer() const { return m_fullScreenRenderer; }
void fullScreenRendererDestroyed();
void fullScreenChangeDelayTimerFired(Timer<Document>*);
void fullScreenChangeDelayTimerFired(Timer<Document>&);
bool fullScreenIsAllowedForElement(Element*) const;
void fullScreenElementRemoved();
void removeFullScreenElementOfSubtree(Node*, bool amongChildrenOnly = false);
......@@ -1266,10 +1266,10 @@ private:
virtual double timerAlignmentInterval() const OVERRIDE;
void updateTitle(const StringWithDirection&);
void updateFocusAppearanceTimerFired(Timer<Document>*);
void updateFocusAppearanceTimerFired(Timer<Document>&);
void updateBaseURL();
void resetHiddenFocusElementTimer(Timer<Document>*);
void resetHiddenFocusElementTimer(Timer<Document>&);
void buildAccessKeyMap(TreeScope* root);
......@@ -1277,9 +1277,9 @@ private:
void seamlessParentUpdatedStylesheets();
void loadEventDelayTimerFired(Timer<Document>*);
void loadEventDelayTimerFired(Timer<Document>&);
void pendingTasksTimerFired(Timer<Document>*);
void pendingTasksTimerFired(Timer<Document>&);
static void didReceiveTask(void*);
......@@ -1302,13 +1302,13 @@ private:
void setVisualUpdatesAllowed(ReadyState);
void setVisualUpdatesAllowed(bool);
void visualUpdatesSuppressionTimerFired(Timer<Document>*);
void visualUpdatesSuppressionTimerFired(Timer<Document>&);
void addListenerType(ListenerType listenerType) { m_listenerTypes |= listenerType; }
void didAssociateFormControlsTimerFired(Timer<Document>*);
void didAssociateFormControlsTimerFired(Timer<Document>&);
void styleResolverThrowawayTimerFired(DeferrableOneShotTimer<Document>*);
void styleResolverThrowawayTimerFired(DeferrableOneShotTimer<Document>&);
DeferrableOneShotTimer<Document> m_styleResolverThrowawayTimer;
OwnPtr<StyleResolver> m_styleResolver;
......@@ -1617,7 +1617,7 @@ private:
RefPtr<DOMSecurityPolicy> m_domSecurityPolicy;
#endif
void sharedObjectPoolClearTimerFired(Timer<Document>*);
void sharedObjectPoolClearTimerFired(Timer<Document>&);
Timer<Document> m_sharedObjectPoolClearTimer;
OwnPtr<DocumentSharedObjectPool> m_sharedObjectPool;
......
......@@ -49,7 +49,7 @@ public:
#endif
private:
void timerFired(Timer<EventSender<T>>*) { dispatchPendingEvents(); }
void timerFired(Timer<EventSender<T>>&) { dispatchPendingEvents(); }
AtomicString m_eventType;
Timer<EventSender<T>> m_timer;
......
......@@ -58,7 +58,7 @@ bool GenericEventQueue::enqueueEvent(PassRefPtr<Event> event)
return true;
}
void GenericEventQueue::timerFired(Timer<GenericEventQueue>*)
void GenericEventQueue::timerFired(Timer<GenericEventQueue>&)
{
ASSERT(!m_timer.isActive());
ASSERT(!m_pendingEvents.isEmpty());
......
......@@ -48,7 +48,7 @@ public:
bool hasPendingEvents() const;
private:
void timerFired(Timer<GenericEventQueue>*);
void timerFired(Timer<GenericEventQueue>&);
EventTarget& m_owner;
Vector<RefPtr<Event>> m_pendingEvents;
......
......@@ -97,9 +97,9 @@ void ScriptRunner::notifyScriptReady(ScriptElement* scriptElement, ExecutionType
m_timer.startOneShot(0);
}
void ScriptRunner::timerFired(Timer<ScriptRunner>* timer)
void ScriptRunner::timerFired(Timer<ScriptRunner>& timer)
{
ASSERT_UNUSED(timer, timer == &m_timer);
ASSERT_UNUSED(timer, &timer == &m_timer);
Ref<Document> protect(m_document);
......
......@@ -55,7 +55,7 @@ public:
void notifyScriptReady(ScriptElement*, ExecutionType);
private:
void timerFired(Timer<ScriptRunner>*);
void timerFired(Timer<ScriptRunner>&);
Document& m_document;
Vector<PendingScript> m_scriptsToExecuteInOrder;
......
......@@ -209,7 +209,7 @@ void ScriptedAnimationController::scheduleAnimation()
}
#if USE(REQUEST_ANIMATION_FRAME_TIMER)
void ScriptedAnimationController::animationTimerFired(Timer<ScriptedAnimationController>*)
void ScriptedAnimationController::animationTimerFired(Timer<ScriptedAnimationController>&)
{
m_lastAnimationFrameTimeMonotonic = monotonicallyIncreasingTime();
serviceScriptedAnimations(m_lastAnimationFrameTimeMonotonic);
......
......@@ -82,7 +82,7 @@ private:
void scheduleAnimation();
#if USE(REQUEST_ANIMATION_FRAME_TIMER)
void animationTimerFired(Timer<ScriptedAnimationController>*);
void animationTimerFired(Timer<ScriptedAnimationController>&);
Timer<ScriptedAnimationController> m_animationTimer;
double m_lastAnimationFrameTimeMonotonic;
......
......@@ -323,7 +323,7 @@ void AlternativeTextController::respondToUnappliedSpellCorrection(const VisibleS
markers.addMarker(range.get(), DocumentMarker::SpellCheckingExemption);
}
void AlternativeTextController::timerFired(Timer<AlternativeTextController>*)
void AlternativeTextController::timerFired(Timer<AlternativeTextController>&)
{
m_isDismissedByEditing = false;
switch (m_alternativeTextInfo.type) {
......
......@@ -138,7 +138,7 @@ private:
#if USE(AUTOCORRECTION_PANEL)
String dismissSoon(ReasonForDismissingAlternativeText);
void applyAlternativeTextToRange(const Range*, const String& alternative, AlternativeTextType, const Vector<DocumentMarker::MarkerType>&);
void timerFired(Timer<AlternativeTextController>*);
void timerFired(Timer<AlternativeTextController>&);
void recordAutocorrectionResponseReversed(const String& replacedString, const String& replacementString);
void recordSpellcheckerResponseForModifiedCorrection(Range* rangeOfCorrection, const String& corrected, const String& correction);
String markerDescriptionForAppliedAlternativeText(AlternativeTextType, DocumentMarker::MarkerType);
......
......@@ -1901,7 +1901,7 @@ void FrameSelection::setCaretVisibility(CaretVisibility visibility)
updateAppearance();
}
void FrameSelection::caretBlinkTimerFired(Timer<FrameSelection>*)
void FrameSelection::caretBlinkTimerFired(Timer<FrameSelection>&)
{
#if ENABLE(TEXT_CARET)
ASSERT(caretIsVisible());
......
......@@ -324,7 +324,7 @@ private:
void setFocusedElementIfNeeded();
void focusedOrActiveStateChanged();
void caretBlinkTimerFired(Timer<FrameSelection>*);
void caretBlinkTimerFired(Timer<FrameSelection>&);
void setCaretVisibility(CaretVisibility);
......
......@@ -800,7 +800,7 @@ void HTMLMediaElement::scheduleEvent(const AtomicString& eventName)
m_asyncEventQueue.enqueueEvent(event.release());
}
void HTMLMediaElement::loadTimerFired(Timer<HTMLMediaElement>*)
void HTMLMediaElement::loadTimerFired(Timer<HTMLMediaElement>&)
{
Ref<HTMLMediaElement> protect(*this); // loadNextSourceChild may fire 'beforeload', which can make arbitrary DOM mutations.
......@@ -2195,7 +2195,7 @@ void HTMLMediaElement::setMediaKeys(MediaKeys* mediaKeys)
}
#endif
void HTMLMediaElement::progressEventTimerFired(Timer<HTMLMediaElement>*)
void HTMLMediaElement::progressEventTimerFired(Timer<HTMLMediaElement>&)
{
ASSERT(m_player);
if (m_networkState != NETWORK_LOADING)
......@@ -2973,7 +2973,7 @@ void HTMLMediaElement::startPlaybackProgressTimer()
m_playbackProgressTimer.startRepeating(maxTimeupdateEventFrequency);
}
void HTMLMediaElement::playbackProgressTimerFired(Timer<HTMLMediaElement>*)
void HTMLMediaElement::playbackProgressTimerFired(Timer<HTMLMediaElement>&)
{
ASSERT(m_player);
......
......@@ -583,9 +583,9 @@ private:
virtual bool mediaPlayerShouldWaitForResponseToAuthenticationChallenge(const AuthenticationChallenge&) OVERRIDE;
void loadTimerFired(Timer<HTMLMediaElement>*);
void progressEventTimerFired(Timer<HTMLMediaElement>*);
void playbackProgressTimerFired(Timer<HTMLMediaElement>*);
void loadTimerFired(Timer<HTMLMediaElement>&);
void progressEventTimerFired(Timer<HTMLMediaElement>&);
void playbackProgressTimerFired(Timer<HTMLMediaElement>&);
void startPlaybackProgressTimer();
void startProgressEventTimer();
void stopPeriodicTimers();
......
......@@ -282,7 +282,7 @@ RenderPtr<RenderElement> HTMLPlugInElement::createElementRenderer(PassRef<Render
return createRenderer<RenderEmbeddedObject>(*this, std::move(style));
}
void HTMLPlugInElement::swapRendererTimerFired(Timer<HTMLPlugInElement>*)
void HTMLPlugInElement::swapRendererTimerFired(Timer<HTMLPlugInElement>&)
{
ASSERT(displayState() == PreparingPluginReplacement || displayState() == DisplayingSnapshot);
if (userAgentShadowRoot())
......
......@@ -109,7 +109,7 @@ protected:
bool m_inBeforeLoadEventHandler;
private:
void swapRendererTimerFired(Timer<HTMLPlugInElement>*);
void swapRendererTimerFired(Timer<HTMLPlugInElement>&);
bool shouldOverridePlugin(const String& url, const String& mimeType);
bool dispatchBeforeLoadEvent(const String& sourceURL); // Not implemented, generates a compile error if subclasses call this by mistake.
......
......@@ -456,7 +456,7 @@ void HTMLPlugInImageElement::createShadowIFrameSubtree(const String& src)
}
#endif
void HTMLPlugInImageElement::removeSnapshotTimerFired(Timer<HTMLPlugInImageElement>*)
void HTMLPlugInImageElement::removeSnapshotTimerFired(Timer<HTMLPlugInImageElement>&)
{
m_snapshotImage = nullptr;
m_isRestartedPlugin = false;
......@@ -568,7 +568,7 @@ void HTMLPlugInImageElement::dispatchPendingMouseClick()
m_simulatedMouseClickTimer.restart();
}
void HTMLPlugInImageElement::simulatedMouseClickTimerFired(DeferrableOneShotTimer<HTMLPlugInImageElement>*)
void HTMLPlugInImageElement::simulatedMouseClickTimerFired(DeferrableOneShotTimer<HTMLPlugInImageElement>&)
{
ASSERT(displayState() == RestartingWithPendingMouseClick);
ASSERT(m_pendingClickEventFromSnapshot);
......
......@@ -143,13 +143,13 @@ private:
virtual void updateSnapshot(PassRefPtr<Image>) OVERRIDE;
virtual void dispatchPendingMouseClick() OVERRIDE;
void simulatedMouseClickTimerFired(DeferrableOneShotTimer<HTMLPlugInImageElement>*);
void simulatedMouseClickTimerFired(DeferrableOneShotTimer<HTMLPlugInImageElement>&);
void restartSimilarPlugIns();
virtual bool isPlugInImageElement() const OVERRIDE { return true; }
void removeSnapshotTimerFired(Timer<HTMLPlugInImageElement>*);
void removeSnapshotTimerFired(Timer<HTMLPlugInImageElement>&);
virtual void defaultEventHandler(Event*) OVERRIDE;
......
......@@ -110,7 +110,7 @@ void HTMLSourceElement::cancelPendingErrorEvent()
m_errorEventTimer.stop();
}
void HTMLSourceElement::errorEventTimerFired(Timer<HTMLSourceElement>*)
void HTMLSourceElement::errorEventTimerFired(Timer<HTMLSourceElement>&)
{
LOG(Media, "HTMLSourceElement::errorEventTimerFired - %p", this);
dispatchEvent(Event::create(eventNames().errorEvent, false, true));
......
......@@ -52,7 +52,7 @@ private:
virtual void removedFrom(ContainerNode&) OVERRIDE;
virtual bool isURLAttribute(const Attribute&) const OVERRIDE;
void errorEventTimerFired(Timer<HTMLSourceElement>*);
void errorEventTimerFired(Timer<HTMLSourceElement>&);
Timer<HTMLSourceElement> m_errorEventTimer;
};
......
......@@ -200,7 +200,7 @@ void HTMLTrackElement::scheduleLoad()
m_loadTimer.startOneShot(0);
}
void HTMLTrackElement::loadTimerFired(Timer<HTMLTrackElement>*)
void HTMLTrackElement::loadTimerFired(Timer<HTMLTrackElement>&)
{
if (!fastHasAttribute(srcAttr))
return;
......
......@@ -75,7 +75,7 @@ private:
virtual bool isURLAttribute(const Attribute&) const OVERRIDE;
void loadTimerFired(Timer<HTMLTrackElement>*);
void loadTimerFired(Timer<HTMLTrackElement>&);
HTMLMediaElement* mediaElement() const;
......
......@@ -537,7 +537,7 @@ void MediaController::scheduleEvent(const AtomicString& eventName)
m_asyncEventTimer.startOneShot(0);
}
void MediaController::asyncEventTimerFired(Timer<MediaController>*)
void MediaController::asyncEventTimerFired(Timer<MediaController>&)
{