Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(166)

Unified Diff: third_party/WebKit/Source/core/loader/FrameLoader.cpp

Issue 1737453004: CL for perf tryjob on linux Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/heap/ThreadState.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/loader/FrameLoader.cpp
diff --git a/third_party/WebKit/Source/core/loader/FrameLoader.cpp b/third_party/WebKit/Source/core/loader/FrameLoader.cpp
index 038cf60a8afc2b21412fab348d49efb7f0661d53..32ee8b2841f9181dc8094162518fc3b2b10fa395 100644
--- a/third_party/WebKit/Source/core/loader/FrameLoader.cpp
+++ b/third_party/WebKit/Source/core/loader/FrameLoader.cpp
@@ -1036,13 +1036,14 @@ bool FrameLoader::prepareForCommit()
RefPtrWillBeRawPtr<DocumentLoader> pdl = m_provisionalDocumentLoader;
if (m_frame->document()) {
- unsigned totalNodeCount = InstanceCounters::counterValue(InstanceCounters::NodeCounter);
- int nodeCount = static_cast<int>(totalNodeCount);
- for (Document* document : Document::liveDocumentSet()) {
- if (document != m_frame->document())
- nodeCount -= document->nodeCount();
+ unsigned nodeCount = 0;
+ for (Frame* frame = m_frame; frame; frame = frame->tree().traverseNext()) {
+ if (frame->isLocalFrame()) {
+ LocalFrame* localFrame = toLocalFrame(frame);
+ nodeCount += localFrame->document()->nodeCount();
+ }
}
- ASSERT(nodeCount >= 0);
+ unsigned totalNodeCount = InstanceCounters::counterValue(InstanceCounters::NodeCounter);
float ratio = static_cast<float>(nodeCount) / totalNodeCount;
ThreadState::current()->schedulePageNavigationGCIfNeeded(ratio);
}
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/heap/ThreadState.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698