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

Side by Side Diff: third_party/WebKit/Source/web/WebLocalFrameImpl.cpp

Issue 2783743002: Fix nullptr deref in maybeRenderFallbackContent() (Closed)
Patch Set: +test Created 3 years, 8 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) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 2060 matching lines...) Expand 10 before | Expand all | Expand 10 after
2071 } 2071 }
2072 2072
2073 bool WebLocalFrameImpl::maybeRenderFallbackContent( 2073 bool WebLocalFrameImpl::maybeRenderFallbackContent(
2074 const WebURLError& error) const { 2074 const WebURLError& error) const {
2075 DCHECK(frame()); 2075 DCHECK(frame());
2076 2076
2077 if (!frame()->owner() || !frame()->owner()->canRenderFallbackContent()) 2077 if (!frame()->owner() || !frame()->owner()->canRenderFallbackContent())
2078 return false; 2078 return false;
2079 2079
2080 FrameLoader& frameloader = frame()->loader(); 2080 FrameLoader& frameloader = frame()->loader();
2081 DCHECK(frameloader.provisionalDocumentLoader()); 2081 if (frameloader.provisionalDocumentLoader())
arthursonzogni 2017/03/31 09:16:33 Can you add a comment that explain why the provisi
2082 frameloader.loadFailed(frameloader.provisionalDocumentLoader(), error); 2082 frameloader.loadFailed(frameloader.provisionalDocumentLoader(), error);
2083 return true; 2083 return true;
arthursonzogni 2017/03/31 09:16:33 Returning true here will not work. You can try to
Nate Chapin 2017/03/31 23:59:59 Is it safe to unconditionally call DidStopLoading
2084 } 2084 }
2085 2085
2086 // Called when a navigation is blocked because a Content Security Policy (CSP) 2086 // Called when a navigation is blocked because a Content Security Policy (CSP)
2087 // is infringed. 2087 // is infringed.
2088 void WebLocalFrameImpl::reportContentSecurityPolicyViolation( 2088 void WebLocalFrameImpl::reportContentSecurityPolicyViolation(
2089 const blink::WebContentSecurityPolicyViolation& violation) { 2089 const blink::WebContentSecurityPolicyViolation& violation) {
2090 addMessageToConsole(blink::WebConsoleMessage( 2090 addMessageToConsole(blink::WebConsoleMessage(
2091 WebConsoleMessage::LevelError, violation.consoleMessage, 2091 WebConsoleMessage::LevelError, violation.consoleMessage,
2092 violation.sourceLocation.url, violation.sourceLocation.lineNumber, 2092 violation.sourceLocation.url, violation.sourceLocation.lineNumber,
2093 violation.sourceLocation.columnNumber)); 2093 violation.sourceLocation.columnNumber));
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after
2510 createMarkup(startPosition, endPosition, AnnotateForInterchange, 2510 createMarkup(startPosition, endPosition, AnnotateForInterchange,
2511 ConvertBlocksToInlines::NotConvert, ResolveNonLocalURLs); 2511 ConvertBlocksToInlines::NotConvert, ResolveNonLocalURLs);
2512 } else { 2512 } else {
2513 clipHtml = 2513 clipHtml =
2514 createMarkup(endPosition, startPosition, AnnotateForInterchange, 2514 createMarkup(endPosition, startPosition, AnnotateForInterchange,
2515 ConvertBlocksToInlines::NotConvert, ResolveNonLocalURLs); 2515 ConvertBlocksToInlines::NotConvert, ResolveNonLocalURLs);
2516 } 2516 }
2517 } 2517 }
2518 2518
2519 } // namespace blink 2519 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698