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

Unified Diff: content/renderer/manifest/manifest_manager.cc

Issue 1571633002: Pass Manifest JSON paser error line and column number to console. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add comments Created 4 years, 11 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
« no previous file with comments | « base/json/json_reader.cc ('k') | content/renderer/manifest/manifest_parser.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/manifest/manifest_manager.cc
diff --git a/content/renderer/manifest/manifest_manager.cc b/content/renderer/manifest/manifest_manager.cc
index b148601cbb3ad8818f6f68fc1b55ca6c873099ba..dcdf176047d52d535e41d8b9f23c12b85702ba96 100644
--- a/content/renderer/manifest/manifest_manager.cc
+++ b/content/renderer/manifest/manifest_manager.cc
@@ -160,12 +160,15 @@ void ManifestManager::OnManifestFetchComplete(
fetcher_.reset();
- for (const std::string& msg : parser.errors()) {
+ for (const scoped_ptr<ManifestParser::ErrorInfo>& error_info :
+ parser.errors()) {
blink::WebConsoleMessage message;
message.level = blink::WebConsoleMessage::LevelError;
- message.text = blink::WebString::fromUTF8(msg);
+ message.text = blink::WebString::fromUTF8(error_info->error_msg);
message.url =
render_frame()->GetWebFrame()->document().manifestURL().string();
+ message.lineNumber = error_info->error_line;
+ message.columnNumber = error_info->error_column;
render_frame()->GetWebFrame()->addMessageToConsole(message);
}
« no previous file with comments | « base/json/json_reader.cc ('k') | content/renderer/manifest/manifest_parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698