| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2011 Google Inc. All rights reserved. | 3 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 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 | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * | 8 * |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. 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 718 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 729 | 729 |
| 730 // willSendRequest() may lead to our LocalFrame being detached or cancelling
the load via nulling the ResourceRequest. | 730 // willSendRequest() may lead to our LocalFrame being detached or cancelling
the load via nulling the ResourceRequest. |
| 731 if (!m_frame || m_request.isNull()) | 731 if (!m_frame || m_request.isNull()) |
| 732 return; | 732 return; |
| 733 | 733 |
| 734 m_applicationCacheHost->willStartLoadingMainResource(m_request); | 734 m_applicationCacheHost->willStartLoadingMainResource(m_request); |
| 735 prepareSubframeArchiveLoadIfNeeded(); | 735 prepareSubframeArchiveLoadIfNeeded(); |
| 736 | 736 |
| 737 ResourceRequest request(m_request); | 737 ResourceRequest request(m_request); |
| 738 DEFINE_STATIC_LOCAL(ResourceLoaderOptions, mainResourceLoadOptions, | 738 DEFINE_STATIC_LOCAL(ResourceLoaderOptions, mainResourceLoadOptions, |
| 739 (SniffContent, DoNotBufferData, AllowStoredCredentials, ClientRequestedC
redentials, CheckContentSecurityPolicy, DocumentContext)); | 739 (DoNotBufferData, AllowStoredCredentials, ClientRequestedCredentials, Ch
eckContentSecurityPolicy, DocumentContext)); |
| 740 FetchRequest cachedResourceRequest(request, FetchInitiatorTypeNames::documen
t, mainResourceLoadOptions); | 740 FetchRequest cachedResourceRequest(request, FetchInitiatorTypeNames::documen
t, mainResourceLoadOptions); |
| 741 m_mainResource = m_fetcher->fetchMainResource(cachedResourceRequest, m_subst
ituteData); | 741 m_mainResource = m_fetcher->fetchMainResource(cachedResourceRequest, m_subst
ituteData); |
| 742 if (!m_mainResource) { | 742 if (!m_mainResource) { |
| 743 m_request = ResourceRequest(); | 743 m_request = ResourceRequest(); |
| 744 // If the load was aborted by clearing m_request, it's possible the Appl
icationCacheHost | 744 // If the load was aborted by clearing m_request, it's possible the Appl
icationCacheHost |
| 745 // is now in a state where starting an empty load will be inconsistent.
Replace it with | 745 // is now in a state where starting an empty load will be inconsistent.
Replace it with |
| 746 // a new ApplicationCacheHost. | 746 // a new ApplicationCacheHost. |
| 747 m_applicationCacheHost = adoptPtr(new ApplicationCacheHost(this)); | 747 m_applicationCacheHost = adoptPtr(new ApplicationCacheHost(this)); |
| 748 maybeLoadEmpty(); | 748 maybeLoadEmpty(); |
| 749 return; | 749 return; |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 823 // This is only called by FrameLoader::replaceDocumentWhileExecutingJavaScriptUR
L() | 823 // This is only called by FrameLoader::replaceDocumentWhileExecutingJavaScriptUR
L() |
| 824 void DocumentLoader::replaceDocumentWhileExecutingJavaScriptURL(const DocumentIn
it& init, const String& source, Document* ownerDocument) | 824 void DocumentLoader::replaceDocumentWhileExecutingJavaScriptURL(const DocumentIn
it& init, const String& source, Document* ownerDocument) |
| 825 { | 825 { |
| 826 m_writer = createWriterFor(ownerDocument, init, mimeType(), m_writer ? m_wri
ter->encoding() : emptyAtom, true); | 826 m_writer = createWriterFor(ownerDocument, init, mimeType(), m_writer ? m_wri
ter->encoding() : emptyAtom, true); |
| 827 if (!source.isNull()) | 827 if (!source.isNull()) |
| 828 m_writer->appendReplacingData(source); | 828 m_writer->appendReplacingData(source); |
| 829 endWriting(m_writer.get()); | 829 endWriting(m_writer.get()); |
| 830 } | 830 } |
| 831 | 831 |
| 832 } // namespace blink | 832 } // namespace blink |
| OLD | NEW |