Migrate Timer to TaskRunnerTimer in AXObjectCacheImpl (issue 2641323002 by hs1217.lee@samsung.com)

1 view
Skip to first unread message

hs121...@samsung.com

unread,
Jan 20, 2017, 9:06:51 AM1/20/17
to har...@chromium.org, chromium...@chromium.org, abox...@chromium.org, aboxhal...@chromium.org, nektar...@chromium.org, yuzo+...@chromium.org, har...@chromium.org, nek...@chromium.org, je_jul...@chromium.org, dmazzon...@chromium.org, dtseng...@chromium.org, blink-...@chromium.org, dmaz...@chromium.org
Reviewers: haraken
CL: https://codereview.chromium.org/2641323002/

Message:
@haraken
PTAL. thank you.

Description:
Migrate Timer to TaskRunnerTimer in AXObjectCacheImpl

BUG=624694

Affected files (+5, -3 lines):
M third_party/WebKit/Source/modules/accessibility/AXObjectCacheImpl.h
M third_party/WebKit/Source/modules/accessibility/AXObjectCacheImpl.cpp


Index: third_party/WebKit/Source/modules/accessibility/AXObjectCacheImpl.cpp
diff --git a/third_party/WebKit/Source/modules/accessibility/AXObjectCacheImpl.cpp b/third_party/WebKit/Source/modules/accessibility/AXObjectCacheImpl.cpp
index 6de9215e570e6b09282ed938542ea425390b6779..f924ea309868476565cb011e2dd862dda2b4da04 100644
--- a/third_party/WebKit/Source/modules/accessibility/AXObjectCacheImpl.cpp
+++ b/third_party/WebKit/Source/modules/accessibility/AXObjectCacheImpl.cpp
@@ -96,8 +96,10 @@ AXObjectCacheImpl::AXObjectCacheImpl(Document& document)
#if ENABLE(ASSERT)
m_hasBeenDisposed(false),
#endif
- m_notificationPostTimer(this,
- &AXObjectCacheImpl::notificationPostTimerFired) {
+ m_notificationPostTimer(
+ TaskRunnerHelper::get(TaskType::UserInteraction, document),
+ this,
+ &AXObjectCacheImpl::notificationPostTimerFired) {
}

AXObjectCacheImpl::~AXObjectCacheImpl() {
Index: third_party/WebKit/Source/modules/accessibility/AXObjectCacheImpl.h
diff --git a/third_party/WebKit/Source/modules/accessibility/AXObjectCacheImpl.h b/third_party/WebKit/Source/modules/accessibility/AXObjectCacheImpl.h
index 8cf8413e32d3e52bc2498a406037b0887358a9a9..523536384233ecb35a60ad08cbd102e73ce841f2 100644
--- a/third_party/WebKit/Source/modules/accessibility/AXObjectCacheImpl.h
+++ b/third_party/WebKit/Source/modules/accessibility/AXObjectCacheImpl.h
@@ -242,7 +242,7 @@ class MODULES_EXPORT AXObjectCacheImpl : public AXObjectCache {
// aria-owns relationship.
HashMap<String, std::unique_ptr<HashSet<AXID>>> m_idToAriaOwnersMapping;

- Timer<AXObjectCacheImpl> m_notificationPostTimer;
+ TaskRunnerTimer<AXObjectCacheImpl> m_notificationPostTimer;
HeapVector<std::pair<Member<AXObject>, AXNotification>> m_notificationsToPost;
void notificationPostTimerFired(TimerBase*);



har...@chromium.org

unread,
Jan 20, 2017, 11:17:33 AM1/20/17
to hs121...@samsung.com, chromium...@chromium.org, abox...@chromium.org, aboxhal...@chromium.org, nektar...@chromium.org, yuzo+...@chromium.org, nek...@chromium.org, je_jul...@chromium.org, dmazzon...@chromium.org, dtseng...@chromium.org, blink-...@chromium.org, dmaz...@chromium.org
This is not a speced task, so I think we should use UnspecedTimer.

Also please explain why you chose the task source in the CL description.


https://codereview.chromium.org/2641323002/

hs121...@samsung.com

unread,
Jan 20, 2017, 6:24:13 PM1/20/17
to har...@chromium.org, chromium...@chromium.org, abox...@chromium.org, aboxhal...@chromium.org, nektar...@chromium.org, yuzo+...@chromium.org, nek...@chromium.org, je_jul...@chromium.org, dmazzon...@chromium.org, dtseng...@chromium.org, blink-...@chromium.org, dmaz...@chromium.org
@haraken
i fixed TaskType as UnspecedTimer. thank you.

https://codereview.chromium.org/2641323002/

har...@chromium.org

unread,
Jan 20, 2017, 8:36:01 PM1/20/17
to hs121...@samsung.com, chromium...@chromium.org, abox...@chromium.org, aboxhal...@chromium.org, nektar...@chromium.org, yuzo+...@chromium.org, nek...@chromium.org, je_jul...@chromium.org, dmazzon...@chromium.org, dtseng...@chromium.org, blink-...@chromium.org, dmaz...@chromium.org

commit-bot@chromium.org via codereview.chromium.org

unread,
Jan 20, 2017, 10:32:00 PM1/20/17
to hs121...@samsung.com, har...@chromium.org, commi...@chromium.org, chromium...@chromium.org, abox...@chromium.org, aboxhal...@chromium.org, nektar...@chromium.org, yuzo+...@chromium.org, nek...@chromium.org, je_jul...@chromium.org, dmazzon...@chromium.org, dtseng...@chromium.org, blink-...@chromium.org, dmaz...@chromium.org

commit-bot@chromium.org via codereview.chromium.org

unread,
Jan 20, 2017, 10:37:12 PM1/20/17
to hs121...@samsung.com, har...@chromium.org, commi...@chromium.org, chromium...@chromium.org, abox...@chromium.org, aboxhal...@chromium.org, nektar...@chromium.org, yuzo+...@chromium.org, nek...@chromium.org, je_jul...@chromium.org, dmazzon...@chromium.org, dtseng...@chromium.org, blink-...@chromium.org, dmaz...@chromium.org
Reply all
Reply to author
Forward
0 new messages