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

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

Issue 2866873002: Validate generated MHTML in mhtml_generation_browsertest.cc tests. (Closed)
Patch Set: Created 3 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: third_party/WebKit/Source/core/loader/DocumentLoader.cpp
diff --git a/third_party/WebKit/Source/core/loader/DocumentLoader.cpp b/third_party/WebKit/Source/core/loader/DocumentLoader.cpp
index 839d841231ae05828c41d5949e949cf0dd66a349..a4e17c2f4e636ba642408d5af3d711ad8d0fd155 100644
--- a/third_party/WebKit/Source/core/loader/DocumentLoader.cpp
+++ b/third_party/WebKit/Source/core/loader/DocumentLoader.cpp
@@ -442,6 +442,13 @@ void DocumentLoader::FinishedLoading(double finish_time) {
// the Document.
if (!writer_)
CommitData(0, 0);
carlosk 2017/05/05 23:46:27 IIUC the local frame is only initialized when data
Łukasz Anforowicz 2017/05/06 00:14:48 Thank you for the comment above. Unfortunately, I
carlosk 2017/05/16 20:56:08 I was confused by all the checks for |frame_| not
+
+ // Log if attempting to load an invalid archive resource.
+ if (IsArchiveMIMEType(response_.MimeType())) {
+ frame_->GetDocument()->AddConsoleMessage(ConsoleMessage::Create(
+ kOtherMessageSource, kErrorMessageLevel,
+ "Malformed multipart archive: " + response_.Url().ElidedString()));
Łukasz Anforowicz 2017/05/06 00:14:48 I see that KURL::ElidedString returns an empty str
Łukasz Anforowicz 2017/05/06 00:42:47 Ooops. I think I misread the code - what I said a
carlosk 2017/05/16 20:56:08 This is me copy/pasting without fully understandin
+ }
}
if (!frame_)

Powered by Google App Engine
This is Rietveld 408576698