Skip to content

Commit 102c3e0

Browse files
committed
[ftrace] make sure subresource load-did-end is marked for main resource too
The start trace point is added in SubresourceLoader::willSendRequestInternal
1 parent 1ef5847 commit 102c3e0

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

Source/WebCore/loader/SubresourceLoader.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -768,7 +768,9 @@ void SubresourceLoader::didFinishLoading(const NetworkLoadMetrics& networkLoadMe
768768
reportResourceTiming(timing ? *timing : NetworkLoadMetrics::emptyMetrics());
769769
}
770770

771+
#if !USE(LINUX_FTRACE)
771772
if (resource->type() != CachedResource::Type::MainResource)
773+
#endif
772774
tracePoint(SubresourceLoadDidEnd, identifier().toUInt64());
773775

774776
m_state = Finishing;
@@ -816,7 +818,9 @@ void SubresourceLoader::didFail(const ResourceError& error)
816818
Ref protectedThis { *this };
817819
m_state = Finishing;
818820

821+
#if !USE(LINUX_FTRACE)
819822
if (resource->type() != CachedResource::Type::MainResource)
823+
#endif
820824
tracePoint(SubresourceLoadDidEnd, identifier().toUInt64());
821825

822826
if (resource->resourceToRevalidate())
@@ -872,7 +876,9 @@ void SubresourceLoader::didCancel(LoadWillContinueInAnotherProcess loadWillConti
872876
CachedResourceHandle resource = m_resource.get();
873877
ASSERT(resource);
874878

879+
#if !USE(LINUX_FTRACE)
875880
if (resource->type() != CachedResource::Type::MainResource)
881+
#endif
876882
tracePoint(SubresourceLoadDidEnd, identifier().toUInt64());
877883

878884
resource->cancelLoad(loadWillContinueInAnotherProcess);

0 commit comments

Comments
 (0)