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

Unified Diff: Source/core/html/parser/XSSAuditorDelegate.cpp

Issue 31063004: Have Frame::loader() return a reference (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 2 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
« no previous file with comments | « Source/core/html/parser/XSSAuditor.cpp ('k') | Source/core/inspector/InspectorApplicationCacheAgent.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/parser/XSSAuditorDelegate.cpp
diff --git a/Source/core/html/parser/XSSAuditorDelegate.cpp b/Source/core/html/parser/XSSAuditorDelegate.cpp
index 19a2ae18f6b14a6a80a1a010dee28d6ccf81f71c..b676bc9b0f203019f417f251db6c9fb0d335fcf8 100644
--- a/Source/core/html/parser/XSSAuditorDelegate.cpp
+++ b/Source/core/html/parser/XSSAuditorDelegate.cpp
@@ -77,10 +77,10 @@ PassRefPtr<FormData> XSSAuditorDelegate::generateViolationReport(const XSSInfo&
{
ASSERT(isMainThread());
- FrameLoader* frameLoader = m_document->frame()->loader();
+ FrameLoader& frameLoader = m_document->frame()->loader();
String httpBody;
- if (frameLoader->documentLoader()) {
- if (FormData* formData = frameLoader->documentLoader()->originalRequest().httpBody())
+ if (frameLoader.documentLoader()) {
+ if (FormData* formData = frameLoader.documentLoader()->originalRequest().httpBody())
httpBody = formData->flattenToString();
}
@@ -102,14 +102,14 @@ void XSSAuditorDelegate::didBlockScript(const XSSInfo& xssInfo)
// stopAllLoaders can detach the Frame, so protect it.
RefPtr<Frame> protect(m_document->frame());
- FrameLoader* frameLoader = m_document->frame()->loader();
+ FrameLoader& frameLoader = m_document->frame()->loader();
if (xssInfo.m_didBlockEntirePage)
- frameLoader->stopAllLoaders();
+ frameLoader.stopAllLoaders();
if (!m_didSendNotifications) {
m_didSendNotifications = true;
- frameLoader->client()->didDetectXSS(m_document->url(), xssInfo.m_didBlockEntirePage);
+ frameLoader.client()->didDetectXSS(m_document->url(), xssInfo.m_didBlockEntirePage);
if (!m_reportURL.isEmpty())
PingLoader::sendViolationReport(m_document->frame(), m_reportURL, generateViolationReport(xssInfo), PingLoader::XSSAuditorViolationReport);
« no previous file with comments | « Source/core/html/parser/XSSAuditor.cpp ('k') | Source/core/inspector/InspectorApplicationCacheAgent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698