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

Unified Diff: Source/core/loader/FrameFetchContext.h

Issue 1116613003: Remove ResourceFetcher's access to a FrameFetchContext when detaching (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 8 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: Source/core/loader/FrameFetchContext.h
diff --git a/Source/core/loader/FrameFetchContext.h b/Source/core/loader/FrameFetchContext.h
index dcdd6e81859948595df2adbecc0f7c69cc813d1d..4d3b3ab12f517128f506fd1e7eafc59af685ae60 100644
--- a/Source/core/loader/FrameFetchContext.h
+++ b/Source/core/loader/FrameFetchContext.h
@@ -55,11 +55,16 @@ public:
return ResourceFetcher::create(adoptPtrWillBeNoop(new FrameFetchContext(loader)));
}
+ static void provideDocumentToContext(FetchContext& context, Document* document)
+ {
+ ASSERT(document);
+ RELEASE_ASSERT(context.isLiveContext());
+ static_cast<FrameFetchContext&>(context).m_document = document;
+ }
+
~FrameFetchContext();
- Document* document() const { return m_document; } // Can be null
- void setDocument(Document* document) { m_document = document; }
- void clearDocumentLoader() { m_documentLoader = nullptr; }
+ bool isLiveContext() { return true; }
void addAdditionalRequestHeaders(ResourceRequest&, FetchResourceType) override;
void setFirstPartyForCookies(ResourceRequest&) override;

Powered by Google App Engine
This is Rietveld 408576698