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

Unified Diff: Source/core/loader/DocumentLoader.cpp

Issue 1125053002: Move renderFallbackContent() into FrameOwner interface. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add comment Created 5 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/loader/DocumentLoader.cpp
diff --git a/Source/core/loader/DocumentLoader.cpp b/Source/core/loader/DocumentLoader.cpp
index 6ab92c1d28ed752fea7653f45cd80fca278dc4b5..ca5e3aa5b68acf618e8c7415722a219476f384ce 100644
--- a/Source/core/loader/DocumentLoader.cpp
+++ b/Source/core/loader/DocumentLoader.cpp
@@ -458,14 +458,10 @@ void DocumentLoader::responseReceived(Resource* resource, const ResourceResponse
if (m_response.isHTTP()) {
int status = m_response.httpStatusCode();
- // FIXME: Fallback content only works if the parent is in the same processs.
if ((status < 200 || status >= 300) && m_frame->owner()) {
- if (!m_frame->deprecatedLocalOwner()) {
- ASSERT_NOT_REACHED();
- } else if (m_frame->deprecatedLocalOwner()->isObjectElement()) {
- m_frame->deprecatedLocalOwner()->renderFallbackContent();
- // object elements are no longer rendered after we fallback, so don't
- // keep trying to process data from their load
+ if (m_frame->owner()->renderFallbackContent()) {
+ // Don't keep trying to process the data from the load if the
+ // fallback content replaces the frame.
cancelMainResourceLoad(ResourceError::cancelledError(m_request.url()));
}
}

Powered by Google App Engine
This is Rietveld 408576698