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

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

Issue 1642283002: Deal with frame removal by content scripts (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Last nits Created 4 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
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 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 if (!frameLoader()) 312 if (!frameLoader())
313 return; 313 return;
314 314
315 if (!maybeCreateArchive()) { 315 if (!maybeCreateArchive()) {
316 // If this is an empty document, it will not have actually been created yet. Commit dummy data so that 316 // If this is an empty document, it will not have actually been created yet. Commit dummy data so that
317 // DocumentWriter::begin() gets called and creates the Document. 317 // DocumentWriter::begin() gets called and creates the Document.
318 if (!m_writer) 318 if (!m_writer)
319 commitData(0, 0); 319 commitData(0, 0);
320 } 320 }
321 321
322 if (!m_frame)
323 return;
324
322 m_applicationCacheHost->finishedLoadingMainResource(); 325 m_applicationCacheHost->finishedLoadingMainResource();
323 endWriting(m_writer.get()); 326 endWriting(m_writer.get());
324 if (m_state < MainResourceDone) 327 if (m_state < MainResourceDone)
325 m_state = MainResourceDone; 328 m_state = MainResourceDone;
326 clearMainResourceHandle(); 329 clearMainResourceHandle();
327 } 330 }
328 331
329 void DocumentLoader::redirectReceived(Resource* resource, ResourceRequest& reque st, const ResourceResponse& redirectResponse) 332 void DocumentLoader::redirectReceived(Resource* resource, ResourceRequest& reque st, const ResourceResponse& redirectResponse)
330 { 333 {
331 ASSERT_UNUSED(resource, resource == m_mainResource); 334 ASSERT_UNUSED(resource, resource == m_mainResource);
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after
752 { 755 {
753 m_writer = createWriterFor(init, mimeType(), m_writer ? m_writer->encoding() : emptyAtom, true, ForceSynchronousParsing); 756 m_writer = createWriterFor(init, mimeType(), m_writer ? m_writer->encoding() : emptyAtom, true, ForceSynchronousParsing);
754 if (!source.isNull()) 757 if (!source.isNull())
755 m_writer->appendReplacingData(source); 758 m_writer->appendReplacingData(source);
756 endWriting(m_writer.get()); 759 endWriting(m_writer.get());
757 } 760 }
758 761
759 DEFINE_WEAK_IDENTIFIER_MAP(DocumentLoader); 762 DEFINE_WEAK_IDENTIFIER_MAP(DocumentLoader);
760 763
761 } // namespace blink 764 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698