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

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

Issue 340363003: Let ThreadableLoaderClientWrapper's client handle failures better. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Move all tests to a separate CL; functional change only. Created 6 years, 6 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/core/loader/ThreadableLoaderClientWrapper.h
diff --git a/Source/core/loader/ThreadableLoaderClientWrapper.h b/Source/core/loader/ThreadableLoaderClientWrapper.h
index 56da8f8e063551615eb016d61474220d079395d5..8755eadef73cb54bb159524415c0a44a17567f28 100644
--- a/Source/core/loader/ThreadableLoaderClientWrapper.h
+++ b/Source/core/loader/ThreadableLoaderClientWrapper.h
@@ -97,16 +97,19 @@ public:
void didFailAccessControlCheck(const ResourceError& error)
{
- m_done = true;
+ // Let the client first handle the failure by possibly issuing
+ // a didFail() with a cancellation error before marking this
+ // wrapper as 'done'.
if (m_client)
m_client->didFailAccessControlCheck(error);
+ m_done = true;
abarth-chromium 2014/06/22 14:48:26 Is the client allowed to destroy |this| during the
sof 2014/06/22 15:49:14 I don't think it will be able to accomplish that p
}
void didFailRedirectCheck()
{
- m_done = true;
if (m_client)
m_client->didFailRedirectCheck();
+ m_done = true;
}
void didReceiveAuthenticationCancellation(unsigned long identifier, const ResourceResponse& response)
« 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