| Index: Source/core/loader/FrameLoader.cpp
|
| diff --git a/Source/core/loader/FrameLoader.cpp b/Source/core/loader/FrameLoader.cpp
|
| index ffb912ae0aadef4c4e3f2f76f2054050709cb0d2..1c25e85bcf1ab3e984a49ed49ba5491a75fd4441 100644
|
| --- a/Source/core/loader/FrameLoader.cpp
|
| +++ b/Source/core/loader/FrameLoader.cpp
|
| @@ -1027,6 +1027,18 @@ bool FrameLoader::prepareForCommit()
|
| PluginScriptForbiddenScope forbidPluginDestructorScripting;
|
| 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();
|
| + }
|
| + ASSERT(nodeCount >= 0);
|
| + float ratio = static_cast<float>(nodeCount) / totalNodeCount;
|
| + ThreadState::current()->schedulePageNavigationGCIfNeeded(ratio);
|
| + }
|
| +
|
| if (m_documentLoader) {
|
| client()->dispatchWillClose();
|
| dispatchUnloadEvent();
|
|
|