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

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

Issue 2416523002: Expose the initiating origin/URL of a navigation in the Blink public API (Closed)
Patch Set: rebase Created 4 years, 1 month 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 ba90b82aa70e5e3e32e3a4f5ed2fca29cdde0e33..b759b1f245dec82097eec31bc894f3da094c9e96 100644
--- a/third_party/WebKit/Source/core/loader/DocumentLoader.cpp
+++ b/third_party/WebKit/Source/core/loader/DocumentLoader.cpp
@@ -97,9 +97,11 @@ static bool shouldInheritSecurityOriginFromOwner(const KURL& url) {
DocumentLoader::DocumentLoader(LocalFrame* frame,
const ResourceRequest& req,
const SubstituteData& substituteData,
- ClientRedirectPolicy clientRedirectPolicy)
+ ClientRedirectPolicy clientRedirectPolicy,
+ Document* requestorDocument)
: m_frame(frame),
m_fetcher(FrameFetchContext::createContextAndFetcher(this, nullptr)),
+ m_requestorDocument(requestorDocument),
m_originalRequest(req),
m_substituteData(substituteData),
m_request(req),
@@ -138,6 +140,7 @@ DEFINE_TRACE(DocumentLoader) {
visitor->trace(m_fetcher);
visitor->trace(m_mainResource);
visitor->trace(m_writer);
+ visitor->trace(m_requestorDocument);
visitor->trace(m_documentLoadTiming);
visitor->trace(m_applicationCacheHost);
visitor->trace(m_contentSecurityPolicy);
@@ -642,6 +645,9 @@ void DocumentLoader::clearMainResourceHandle() {
return;
m_mainResource->removeClient(this);
m_mainResource = nullptr;
+
+ // TODO(dcheng): This doesn't really belong here.
+ m_requestorDocument = nullptr;
}
bool DocumentLoader::maybeCreateArchive() {
« no previous file with comments | « third_party/WebKit/Source/core/loader/DocumentLoader.h ('k') | third_party/WebKit/Source/core/loader/EmptyClients.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698