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

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

Issue 571003002: Dispose ApplicationCacheHost on DocumentLoader finalization. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/core/loader/appcache/ApplicationCacheHost.h » ('j') | 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) 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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 ResourceLoader* DocumentLoader::mainResourceLoader() const 98 ResourceLoader* DocumentLoader::mainResourceLoader() const
99 { 99 {
100 return m_mainResource ? m_mainResource->loader() : 0; 100 return m_mainResource ? m_mainResource->loader() : 0;
101 } 101 }
102 102
103 DocumentLoader::~DocumentLoader() 103 DocumentLoader::~DocumentLoader()
104 { 104 {
105 ASSERT(!m_frame || !isLoading()); 105 ASSERT(!m_frame || !isLoading());
106 m_fetcher->clearDocumentLoader(); 106 m_fetcher->clearDocumentLoader();
107 clearMainResourceHandle(); 107 clearMainResourceHandle();
108 m_applicationCacheHost->dispose();
108 } 109 }
109 110
110 unsigned long DocumentLoader::mainResourceIdentifier() const 111 unsigned long DocumentLoader::mainResourceIdentifier() const
111 { 112 {
112 return m_mainResource ? m_mainResource->identifier() : 0; 113 return m_mainResource ? m_mainResource->identifier() : 0;
113 } 114 }
114 115
115 Document* DocumentLoader::document() const 116 Document* DocumentLoader::document() const
116 { 117 {
117 if (m_frame && m_frame->loader().documentLoader() == this) 118 if (m_frame && m_frame->loader().documentLoader() == this)
(...skipping 711 matching lines...) Expand 10 before | Expand all | Expand 10 after
829 // This is only called by FrameLoader::replaceDocumentWhileExecutingJavaScriptUR L() 830 // This is only called by FrameLoader::replaceDocumentWhileExecutingJavaScriptUR L()
830 void DocumentLoader::replaceDocumentWhileExecutingJavaScriptURL(const DocumentIn it& init, const String& source, Document* ownerDocument) 831 void DocumentLoader::replaceDocumentWhileExecutingJavaScriptURL(const DocumentIn it& init, const String& source, Document* ownerDocument)
831 { 832 {
832 m_writer = createWriterFor(ownerDocument, init, mimeType(), m_writer ? m_wri ter->encoding() : emptyAtom, true); 833 m_writer = createWriterFor(ownerDocument, init, mimeType(), m_writer ? m_wri ter->encoding() : emptyAtom, true);
833 if (!source.isNull()) 834 if (!source.isNull())
834 m_writer->appendReplacingData(source); 835 m_writer->appendReplacingData(source);
835 endWriting(m_writer.get()); 836 endWriting(m_writer.get());
836 } 837 }
837 838
838 } // namespace blink 839 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | Source/core/loader/appcache/ApplicationCacheHost.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698