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

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

Issue 1644813002: Don't crash when navigating an OOPIF to a URL that fails. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 | « content/browser/site_per_process_browsertest.cc ('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, 2009, 2010, 2011 Apple Inc. All rights reserv ed. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv ed.
3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
4 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 4 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
5 * Copyright (C) 2008 Alp Toker <alp@atoker.com> 5 * Copyright (C) 2008 Alp Toker <alp@atoker.com>
6 * Copyright (C) Research In Motion Limited 2009. All rights reserved. 6 * Copyright (C) Research In Motion Limited 2009. All rights reserved.
7 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com> 7 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com>
8 * Copyright (C) 2011 Google Inc. All rights reserved. 8 * Copyright (C) 2011 Google Inc. All rights reserved.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
(...skipping 1191 matching lines...) Expand 10 before | Expand all | Expand 10 after
1202 void FrameLoader::receivedMainResourceError(DocumentLoader* loader, const Resour ceError& error) 1202 void FrameLoader::receivedMainResourceError(DocumentLoader* loader, const Resour ceError& error)
1203 { 1203 {
1204 // Retain because the stop may release the last reference to it. 1204 // Retain because the stop may release the last reference to it.
1205 RefPtrWillBeRawPtr<LocalFrame> protect(m_frame.get()); 1205 RefPtrWillBeRawPtr<LocalFrame> protect(m_frame.get());
1206 RefPtrWillBeRawPtr<DocumentLoader> protectDocumentLoader(loader); 1206 RefPtrWillBeRawPtr<DocumentLoader> protectDocumentLoader(loader);
1207 1207
1208 // FIXME: We really ought to be able to just check for isCancellation() here , but there are some 1208 // FIXME: We really ought to be able to just check for isCancellation() here , but there are some
1209 // ResourceErrors that setIsCancellation() but aren't created by ResourceErr or::cancelledError(). 1209 // ResourceErrors that setIsCancellation() but aren't created by ResourceErr or::cancelledError().
1210 ResourceError c(ResourceError::cancelledError(KURL())); 1210 ResourceError c(ResourceError::cancelledError(KURL()));
1211 if ((error.errorCode() != c.errorCode() || error.domain() != c.domain()) && m_frame->owner()) { 1211 if ((error.errorCode() != c.errorCode() || error.domain() != c.domain()) && m_frame->owner()) {
1212 // FIXME: For now, fallback content doesn't work cross process. 1212 // FIXME: For now, fallback content doesn't work cross process.
Charlie Reis 2016/01/28 00:51:37 Is this FIXME still needed? The network error pag
Nate Chapin 2016/01/28 00:56:08 Fallback content in this sense is, e.g., an image
Charlie Reis 2016/01/28 01:02:17 Ok, that sounds like something else. I'll leave t
1213 ASSERT(m_frame->owner()->isLocal()); 1213 if (m_frame->owner()->isLocal())
1214 m_frame->deprecatedLocalOwner()->renderFallbackContent(); 1214 m_frame->deprecatedLocalOwner()->renderFallbackContent();
1215 } 1215 }
1216 1216
1217 HistoryCommitType historyCommitType = loadTypeToCommitType(m_loadType); 1217 HistoryCommitType historyCommitType = loadTypeToCommitType(m_loadType);
1218 if (loader == m_provisionalDocumentLoader) { 1218 if (loader == m_provisionalDocumentLoader) {
1219 client()->dispatchDidFailProvisionalLoad(error, historyCommitType); 1219 client()->dispatchDidFailProvisionalLoad(error, historyCommitType);
1220 if (loader != m_provisionalDocumentLoader) 1220 if (loader != m_provisionalDocumentLoader)
1221 return; 1221 return;
1222 detachDocumentLoader(m_provisionalDocumentLoader); 1222 detachDocumentLoader(m_provisionalDocumentLoader);
1223 m_progressTracker->progressCompleted(); 1223 m_progressTracker->progressCompleted();
1224 } else { 1224 } else {
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
1546 // FIXME: We need a way to propagate insecure requests policy flags to 1546 // FIXME: We need a way to propagate insecure requests policy flags to
1547 // out-of-process frames. For now, we'll always use default behavior. 1547 // out-of-process frames. For now, we'll always use default behavior.
1548 if (!parentFrame->isLocalFrame()) 1548 if (!parentFrame->isLocalFrame())
1549 return nullptr; 1549 return nullptr;
1550 1550
1551 ASSERT(toLocalFrame(parentFrame)->document()); 1551 ASSERT(toLocalFrame(parentFrame)->document());
1552 return toLocalFrame(parentFrame)->document()->insecureNavigationsToUpgrade() ; 1552 return toLocalFrame(parentFrame)->document()->insecureNavigationsToUpgrade() ;
1553 } 1553 }
1554 1554
1555 } // namespace blink 1555 } // namespace blink
OLDNEW
« no previous file with comments | « content/browser/site_per_process_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698