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 * | 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 Loading... |
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 Loading... |
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 } |
OLD | NEW |