Migrate Timer to TaskRunnerTimer in InspectorNetworkAgent (issue 2648083002 by hs1217.lee@samsung.com)

1 view
Skip to first unread message

hs121...@samsung.com

unread,
Jan 21, 2017, 12:30:36 AM1/21/17
to har...@chromium.org, chromium...@chromium.org, caseq...@chromium.org, lushnik...@chromium.org, pfeldma...@chromium.org, apavlo...@chromium.org, devtools...@chromium.org, blink-...@chromium.org, kozyatins...@chromium.org
Reviewers: haraken
CL: https://codereview.chromium.org/2648083002/

Message:
@haraken
PTAL, Thank you

Description:
Migrate Timer to TaskRunnerTimer in InspectorNetworkAgent

Migrate Timer to TaskRunnerTimer in InspectorNetworkAgent
InspectorNetworkAgent is associated with networking task source.

BUG=624694

Affected files (+3, -2 lines):
M third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.h
M third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.cpp


Index: third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.cpp
diff --git a/third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.cpp b/third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.cpp
index 93b7ec551e89ce49b84a26259511b15afd699f00..a34eb693facc0a69bfb062315fddad5d96794b65 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.cpp
+++ b/third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.cpp
@@ -34,6 +34,7 @@
#include "bindings/core/v8/SourceLocation.h"
#include "core/dom/Document.h"
#include "core/dom/ScriptableDocumentParser.h"
+#include "core/dom/TaskRunnerHelper.h"
#include "core/fetch/FetchInitiatorInfo.h"
#include "core/fetch/FetchInitiatorTypeNames.h"
#include "core/fetch/MemoryCache.h"
@@ -1531,6 +1532,7 @@ InspectorNetworkAgent::InspectorNetworkAgent(InspectedFrames* inspectedFrames)
m_pendingRequest(nullptr),
m_isRecalculatingStyle(false),
m_removeFinishedReplayXHRTimer(
+ TaskRunnerHelper::get(TaskType::Networking, inspectedFrames->root()),
this,
&InspectorNetworkAgent::removeFinishedReplayXHRFired) {}

Index: third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.h
diff --git a/third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.h b/third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.h
index c55719d8fb54020d24ba80bc7118ff80f02b04e2..c38e1928723bee37cec71e158137343247549afa 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.h
+++ b/third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.h
@@ -36,7 +36,6 @@
#include "core/inspector/InspectorBaseAgent.h"
#include "core/inspector/InspectorPageAgent.h"
#include "core/inspector/protocol/Network.h"
-#include "platform/Timer.h"
#include "platform/heap/Handle.h"
#include "wtf/text/WTFString.h"

@@ -280,7 +279,7 @@ class CORE_EXPORT InspectorNetworkAgent final

HeapHashSet<Member<XMLHttpRequest>> m_replayXHRs;
HeapHashSet<Member<XMLHttpRequest>> m_replayXHRsToBeDeleted;
- Timer<InspectorNetworkAgent> m_removeFinishedReplayXHRTimer;
+ TaskRunnerTimer<InspectorNetworkAgent> m_removeFinishedReplayXHRTimer;
};

} // namespace blink


har...@chromium.org

unread,
Jan 22, 2017, 7:10:43 PM1/22/17
to hs121...@samsung.com, chromium...@chromium.org, caseq...@chromium.org, lushnik...@chromium.org, pfeldma...@chromium.org, apavlo...@chromium.org, devtools...@chromium.org, blink-...@chromium.org, kozyatins...@chromium.org
Inspector is an internal thing, and thus the task should not be a speced one. So
I think we should use UnspecedTimer or UnspecedLoading. Given that the task is
about XHR, UnspecedLoading would be better.




https://codereview.chromium.org/2648083002/

hs121...@samsung.com

unread,
Jan 23, 2017, 8:33:08 AM1/23/17
to har...@chromium.org, chromium...@chromium.org, caseq...@chromium.org, lushnik...@chromium.org, pfeldma...@chromium.org, apavlo...@chromium.org, devtools...@chromium.org, blink-...@chromium.org, kozyatins...@chromium.org
On 2017/01/23 00:10:43, haraken wrote:
> Inspector is an internal thing, and thus the task should not be a speced one.
So
> I think we should use UnspecedTimer or UnspecedLoading. Given that the task is
> about XHR, UnspecedLoading would be better.

i changed to UnspecedLoading from Networking. PTAL, thank you.

https://codereview.chromium.org/2648083002/

har...@chromium.org

unread,
Jan 23, 2017, 8:35:52 AM1/23/17
to hs121...@samsung.com, chromium...@chromium.org, caseq...@chromium.org, lushnik...@chromium.org, pfeldma...@chromium.org, apavlo...@chromium.org, devtools...@chromium.org, blink-...@chromium.org, kozyatins...@chromium.org

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

unread,
Jan 23, 2017, 9:21:29 AM1/23/17
to hs121...@samsung.com, har...@chromium.org, commi...@chromium.org, chromium...@chromium.org, caseq...@chromium.org, lushnik...@chromium.org, pfeldma...@chromium.org, apavlo...@chromium.org, devtools...@chromium.org, blink-...@chromium.org, kozyatins...@chromium.org

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

unread,
Jan 23, 2017, 11:09:20 AM1/23/17
to hs121...@samsung.com, har...@chromium.org, commi...@chromium.org, chromium...@chromium.org, caseq...@chromium.org, lushnik...@chromium.org, pfeldma...@chromium.org, apavlo...@chromium.org, devtools...@chromium.org, blink-...@chromium.org, kozyatins...@chromium.org
Try jobs failed on following builders:
linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_FAILED,
http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/375946)

https://codereview.chromium.org/2648083002/

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

unread,
Jan 23, 2017, 4:16:55 PM1/23/17
to hs121...@samsung.com, har...@chromium.org, commi...@chromium.org, chromium...@chromium.org, caseq...@chromium.org, lushnik...@chromium.org, pfeldma...@chromium.org, apavlo...@chromium.org, devtools...@chromium.org, blink-...@chromium.org, kozyatins...@chromium.org

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

unread,
Jan 23, 2017, 5:42:27 PM1/23/17
to hs121...@samsung.com, har...@chromium.org, commi...@chromium.org, chromium...@chromium.org, caseq...@chromium.org, lushnik...@chromium.org, pfeldma...@chromium.org, apavlo...@chromium.org, devtools...@chromium.org, blink-...@chromium.org, kozyatins...@chromium.org
Reply all
Reply to author
Forward
0 new messages