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

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

Issue 1829803002: [WeakMemoryCache] Do not lookup MemoryCache when adding resource to Inspector (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@MemoryCache_MakeWeak2d
Patch Set: Do not expose DocumentLoader::mainResource() Created 4 years, 7 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
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 d393122b2c8f9f9091f11e79e3abbdf46024eb06..0a17529f93249e72c15c6b11671ad003d72fc766 100644
--- a/third_party/WebKit/Source/core/loader/DocumentLoader.cpp
+++ b/third_party/WebKit/Source/core/loader/DocumentLoader.cpp
@@ -260,7 +260,7 @@ void DocumentLoader::notifyFinished(Resource* resource)
// TODO(mkwst): Magic numbers bad.
if (m_mainResource->resourceError().errorCode() == -27)
- InspectorInstrumentation::canceledAfterReceivedResourceResponse(m_frame, this, mainResourceIdentifier(), resource->response());
+ InspectorInstrumentation::canceledAfterReceivedResourceResponse(m_frame, this, mainResourceIdentifier(), resource->response(), m_mainResource.get());
frameLoader()->loadFailed(this, m_mainResource->resourceError());
clearMainResourceHandle();
@@ -357,7 +357,7 @@ bool DocumentLoader::shouldContinueForResponse() const
void DocumentLoader::cancelLoadAfterCSPDenied(const ResourceResponse& response)
{
- InspectorInstrumentation::canceledAfterReceivedResourceResponse(m_frame, this, mainResourceIdentifier(), response);
+ InspectorInstrumentation::canceledAfterReceivedResourceResponse(m_frame, this, mainResourceIdentifier(), response, m_mainResource.get());
setWasBlockedAfterCSP();
@@ -399,7 +399,7 @@ void DocumentLoader::responseReceived(Resource* resource, const ResourceResponse
m_mainResource->setDataBufferingPolicy(BufferData);
if (!shouldContinueForResponse()) {
- InspectorInstrumentation::continueWithPolicyIgnore(m_frame, this, m_mainResource->identifier(), m_response);
+ InspectorInstrumentation::continueWithPolicyIgnore(m_frame, this, m_mainResource->identifier(), m_response, m_mainResource.get());
m_fetcher->stopFetching();
return;
}

Powered by Google App Engine
This is Rietveld 408576698