Index: third_party/WebKit/Source/core/loader/DocumentLoader.cpp |
diff --git a/third_party/WebKit/Source/core/loader/DocumentLoader.cpp b/third_party/WebKit/Source/core/loader/DocumentLoader.cpp |
index eed357ee0d184eb69b8ab5758411a31b53e12206..b6c7420691109dcc6941ca3e470dbfa6cf7a23b4 100644 |
--- a/third_party/WebKit/Source/core/loader/DocumentLoader.cpp |
+++ b/third_party/WebKit/Source/core/loader/DocumentLoader.cpp |
@@ -61,6 +61,8 @@ |
#include "core/page/FrameTree.h" |
#include "core/page/Page.h" |
#include "core/probe/CoreProbes.h" |
+#include "core/timing/DOMWindowPerformance.h" |
+#include "core/timing/Performance.h" |
#include "platform/HTTPNames.h" |
#include "platform/UserGestureIndicator.h" |
#include "platform/feature_policy/FeaturePolicy.h" |
@@ -128,8 +130,8 @@ LocalFrameClient& DocumentLoader::GetLocalFrameClient() const { |
DCHECK(frame_); |
LocalFrameClient* client = frame_->Client(); |
// LocalFrame clears its |m_client| only after detaching all DocumentLoaders |
- // (i.e. calls detachFromFrame() which clears |m_frame|) owned by the |
- // LocalFrame's FrameLoader. So, if |m_frame| is non nullptr, |client| is |
+ // (i.e. calls detachFromFrame() which clears |frame_|) owned by the |
+ // LocalFrame's FrameLoader. So, if |frame_| is non nullptr, |client| is |
// also non nullptr. |
DCHECK(client); |
return *client; |
@@ -948,6 +950,13 @@ void DocumentLoader::DidInstallNewDocument(Document* document) { |
document->ParseAndSetReferrerPolicy(referrer_policy_header); |
} |
+ if (RuntimeEnabledFeatures::serverTimingEnabled() && |
+ frame_->GetDocument()->domWindow()) { |
+ DOMWindowPerformance::performance(*(frame_->GetDocument()->domWindow())) |
+ ->AddServerTiming(response_, |
+ PerformanceBase::ShouldAddToBuffer::Always); |
+ } |
+ |
GetLocalFrameClient().DidCreateNewDocument(); |
} |
@@ -1058,7 +1067,7 @@ void DocumentLoader::InstallNewDocument( |
// that the name would be nulled and if the name is accessed after we will |
// fire a UseCounter. If we decide to move forward with this change, we'd |
// actually clean the name here. |
- // m_frame->tree().setName(nullAtom); |
+ // frame_->tree().setName(nullAtom); |
frame_->Tree().ExperimentalSetNulledName(); |
} |