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

Side by Side Diff: third_party/WebKit/Source/core/loader/DocumentThreadableLoader.cpp

Issue 1964823002: Set SkipServiceWorker flag in DocumentThreadableLoader::loadActualRequest(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved.
3 * Copyright (C) 2013, Intel Corporation 3 * Copyright (C) 2013, Intel Corporation
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 788 matching lines...) Expand 10 before | Expand all | Expand 10 after
799 { 799 {
800 ResourceRequest actualRequest = m_actualRequest; 800 ResourceRequest actualRequest = m_actualRequest;
801 ResourceLoaderOptions actualOptions = m_actualOptions; 801 ResourceLoaderOptions actualOptions = m_actualOptions;
802 m_actualRequest = ResourceRequest(); 802 m_actualRequest = ResourceRequest();
803 m_actualOptions = ResourceLoaderOptions(); 803 m_actualOptions = ResourceLoaderOptions();
804 804
805 actualRequest.setHTTPOrigin(getSecurityOrigin()); 805 actualRequest.setHTTPOrigin(getSecurityOrigin());
806 806
807 clearResource(); 807 clearResource();
808 808
809 // Explicitly set the SkipServiceWorker flag here. Even if the page was not
810 // controlled by a SW when the preflight request was sent, a new SW may be
811 // controlling the page now by calling clients.claim(). We should not send
812 // the actual request to the SW. https://crbug.com/604583
813 actualRequest.setSkipServiceWorker(true);
tyoshino (SeeGerritForStatus) 2016/05/10 09:17:01 So, the approach is to have the series of requests
horo 2016/05/10 13:20:27 In the redirect case, the request is passed from W
tyoshino (SeeGerritForStatus) 2016/05/10 13:52:48 ok
814
809 loadRequest(actualRequest, actualOptions); 815 loadRequest(actualRequest, actualOptions);
810 // |this| may be dead here in async mode. 816 // |this| may be dead here in async mode.
811 } 817 }
812 818
813 void DocumentThreadableLoader::handlePreflightFailure(const String& url, const S tring& errorDescription) 819 void DocumentThreadableLoader::handlePreflightFailure(const String& url, const S tring& errorDescription)
814 { 820 {
815 ResourceError error(errorDomainBlinkInternal, 0, url, errorDescription); 821 ResourceError error(errorDomainBlinkInternal, 0, url, errorDescription);
816 822
817 // Prevent handleSuccessfulFinish() from bypassing access check. 823 // Prevent handleSuccessfulFinish() from bypassing access check.
818 m_actualRequest = ResourceRequest(); 824 m_actualRequest = ResourceRequest();
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
968 return m_securityOrigin ? m_securityOrigin.get() : document().getSecurityOri gin(); 974 return m_securityOrigin ? m_securityOrigin.get() : document().getSecurityOri gin();
969 } 975 }
970 976
971 Document& DocumentThreadableLoader::document() const 977 Document& DocumentThreadableLoader::document() const
972 { 978 {
973 ASSERT(m_document); 979 ASSERT(m_document);
974 return *m_document; 980 return *m_document;
975 } 981 }
976 982
977 } // namespace blink 983 } // namespace blink
OLDNEW
« 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