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

Unified Diff: Source/web/AssociatedURLLoader.cpp

Issue 213383008: Avoid (theorethical) NPE. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 9 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/AssociatedURLLoader.cpp
diff --git a/Source/web/AssociatedURLLoader.cpp b/Source/web/AssociatedURLLoader.cpp
index 44d1a61ef5dbe6cb4a837fa24d513ddf5660aaaa..2d57aaa3e2ed5f6b7a6c278e7db40630b5cf7282 100644
--- a/Source/web/AssociatedURLLoader.cpp
+++ b/Source/web/AssociatedURLLoader.cpp
@@ -201,6 +201,9 @@ void AssociatedURLLoader::ClientAdapter::didSendData(unsigned long long bytesSen
void AssociatedURLLoader::ClientAdapter::didReceiveResponse(unsigned long, const ResourceResponse& response)
{
+ if (!m_client)
+ return;
+
// Try to use the original ResourceResponse if possible.
WebURLResponse validatedResponse = WrappedResourceResponse(response);
HTTPResponseHeaderValidator validator(m_options.crossOriginRequestPolicy == WebURLLoaderOptions::CrossOriginRequestPolicyUseAccessControl);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698