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

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

Issue 6709019: Merge 79808 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/648/
Patch Set: Created 9 years, 9 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 | « LayoutTests/fast/frames/iframe-plugin-load-remove-document-crash-expected.txt ('k') | 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) 2006, 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 if (FrameLoader* loader = frameLoader()) { 277 if (FrameLoader* loader = frameLoader()) {
278 loader->finishedLoadingDocument(this); 278 loader->finishedLoadingDocument(this);
279 loader->writer()->end(); 279 loader->writer()->end();
280 } 280 }
281 } 281 }
282 282
283 void DocumentLoader::commitLoad(const char* data, int length) 283 void DocumentLoader::commitLoad(const char* data, int length)
284 { 284 {
285 // Both unloading the old page and parsing the new page may execute JavaScri pt which destroys the datasource 285 // Both unloading the old page and parsing the new page may execute JavaScri pt which destroys the datasource
286 // by starting a new load, so retain temporarily. 286 // by starting a new load, so retain temporarily.
287 RefPtr<DocumentLoader> protect(this); 287 RefPtr<Frame> protectFrame(m_frame);
288 RefPtr<DocumentLoader> protectLoader(this);
288 289
289 commitIfReady(); 290 commitIfReady();
290 FrameLoader* frameLoader = DocumentLoader::frameLoader(); 291 FrameLoader* frameLoader = DocumentLoader::frameLoader();
291 if (!frameLoader) 292 if (!frameLoader)
292 return; 293 return;
293 if (ArchiveFactory::isArchiveMimeType(response().mimeType())) 294 if (ArchiveFactory::isArchiveMimeType(response().mimeType()))
294 return; 295 return;
295 frameLoader->client()->committedLoad(this, data, length); 296 frameLoader->client()->committedLoad(this, data, length);
296 } 297 }
297 298
(...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after
819 } 820 }
820 } 821 }
821 822
822 void DocumentLoader::iconLoadDecisionAvailable() 823 void DocumentLoader::iconLoadDecisionAvailable()
823 { 824 {
824 if (m_frame) 825 if (m_frame)
825 m_frame->loader()->iconLoadDecisionAvailable(); 826 m_frame->loader()->iconLoadDecisionAvailable();
826 } 827 }
827 828
828 } 829 }
OLDNEW
« no previous file with comments | « LayoutTests/fast/frames/iframe-plugin-load-remove-document-crash-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698