Commit 1d7a2e8d authored by mkwst's avatar mkwst Committed by Commit bot

Fix a potential null deref in XSSAuditorDelegate.

The ASAN bots say this causes a crash; I can't replicate it locally, but
I believe that the combination of `document.write` and synchronous
`javascript:` URL navigation could cause the auditor to trigger while the
document is detaching. This patch adds a small check.

BUG=668772

Review-Url: https://codereview.chromium.org/2531253002
Cr-Commit-Position: refs/heads/master@{#434927}
parent 59c7989e
...@@ -115,7 +115,7 @@ void XSSAuditorDelegate::didBlockScript(const XSSInfo& xssInfo) { ...@@ -115,7 +115,7 @@ void XSSAuditorDelegate::didBlockScript(const XSSInfo& xssInfo) {
if (xssInfo.m_didBlockEntirePage) if (xssInfo.m_didBlockEntirePage)
frameLoader.stopAllLoaders(); frameLoader.stopAllLoaders();
if (!m_didSendNotifications) { if (!m_didSendNotifications && frameLoader.client()) {
m_didSendNotifications = true; m_didSendNotifications = true;
frameLoader.client()->didDetectXSS(m_document->url(), frameLoader.client()->didDetectXSS(m_document->url(),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment