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

Unified Diff: third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js

Issue 2265823002: DevTools: fix instances where asParsedURL is null (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix instances with parsedURL Created 4 years, 4 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/devtools/front_end/console/ConsoleView.js
diff --git a/third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js b/third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js
index 1a77e9750f7711779fb9fda5e39656600c8e6b52..1258ae17b3cc448c475f6174968a3eeaaabdb978 100644
--- a/third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js
+++ b/third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js
@@ -617,7 +617,8 @@ WebInspector.ConsoleView.prototype = {
_saveConsole: function()
{
var url = WebInspector.targetManager.mainTarget().inspectedURL();
- var filename = String.sprintf("%s-%d.log", url.asParsedURL().host, Date.now());
+ var parsedURL = url.asParsedURL();
+ var filename = String.sprintf("%s-%d.log", parsedURL ? parsedURL.host : "console", Date.now());
var stream = new WebInspector.FileOutputStream();
var progressIndicator = new WebInspector.ProgressIndicator();

Powered by Google App Engine
This is Rietveld 408576698