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

Side by Side Diff: Source/core/loader/DocumentLoader.cpp

Issue 552733003: Oilpan: make DOMWindowProperty a GC mixin. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Pacify GC plugin wrt LocalDOMWindow::trace() Created 6 years, 3 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
OLDNEW
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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 : m_frame(frame) 76 : m_frame(frame)
77 , m_fetcher(ResourceFetcher::create(this)) 77 , m_fetcher(ResourceFetcher::create(this))
78 , m_originalRequest(req) 78 , m_originalRequest(req)
79 , m_substituteData(substituteData) 79 , m_substituteData(substituteData)
80 , m_request(req) 80 , m_request(req)
81 , m_committed(false) 81 , m_committed(false)
82 , m_isClientRedirect(false) 82 , m_isClientRedirect(false)
83 , m_replacesCurrentHistoryItem(false) 83 , m_replacesCurrentHistoryItem(false)
84 , m_loadingMainResource(false) 84 , m_loadingMainResource(false)
85 , m_timeOfLastDataReceived(0.0) 85 , m_timeOfLastDataReceived(0.0)
86 , m_applicationCacheHost(adoptPtr(new ApplicationCacheHost(this))) 86 , m_applicationCacheHost(ApplicationCacheHost::create(this))
87 { 87 {
88 } 88 }
89 89
90 FrameLoader* DocumentLoader::frameLoader() const 90 FrameLoader* DocumentLoader::frameLoader() const
91 { 91 {
92 if (!m_frame) 92 if (!m_frame)
93 return 0; 93 return 0;
94 return &m_frame->loader(); 94 return &m_frame->loader();
95 } 95 }
96 96
(...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after
737 ResourceRequest request(m_request); 737 ResourceRequest request(m_request);
738 DEFINE_STATIC_LOCAL(ResourceLoaderOptions, mainResourceLoadOptions, 738 DEFINE_STATIC_LOCAL(ResourceLoaderOptions, mainResourceLoadOptions,
739 (DoNotBufferData, AllowStoredCredentials, ClientRequestedCredentials, Ch eckContentSecurityPolicy, 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 = ApplicationCacheHost::create(this);
748 maybeLoadEmpty(); 748 maybeLoadEmpty();
749 return; 749 return;
750 } 750 }
751 m_mainResource->addClient(this); 751 m_mainResource->addClient(this);
752 752
753 // A bunch of headers are set when the underlying ResourceLoader is created, and m_request needs to include those. 753 // A bunch of headers are set when the underlying ResourceLoader is created, and m_request needs to include those.
754 if (mainResourceLoader()) 754 if (mainResourceLoader())
755 request = mainResourceLoader()->originalRequest(); 755 request = mainResourceLoader()->originalRequest();
756 // If there was a fragment identifier on m_request, the cache will have stri pped it. m_request should include 756 // If there was a fragment identifier on m_request, the cache will have stri pped it. m_request should include
757 // the fragment identifier, so add that back in. 757 // the fragment identifier, so add that back in.
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698