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

Side by Side 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2009 Joseph Pecoraro 3 * Copyright (C) 2009 Joseph Pecoraro
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 599 matching lines...) Expand 10 before | Expand all | Expand 10 after
610 contextMenu.appendSeparator(); 610 contextMenu.appendSeparator();
611 contextMenu.appendItem(WebInspector.UIString("Replay XHR"), request. replayXHR.bind(request)); 611 contextMenu.appendItem(WebInspector.UIString("Replay XHR"), request. replayXHR.bind(request));
612 } 612 }
613 613
614 contextMenu.show(); 614 contextMenu.show();
615 }, 615 },
616 616
617 _saveConsole: function() 617 _saveConsole: function()
618 { 618 {
619 var url = WebInspector.targetManager.mainTarget().inspectedURL(); 619 var url = WebInspector.targetManager.mainTarget().inspectedURL();
620 var filename = String.sprintf("%s-%d.log", url.asParsedURL().host, Date. now()); 620 var parsedURL = url.asParsedURL();
621 var filename = String.sprintf("%s-%d.log", parsedURL ? parsedURL.host : WebInspector.UIString("log"), Date.now());
dgozman 2016/08/22 17:05:42 - log -> console; - remove UIString, as it's not a
luoe 2016/08/22 17:40:40 Done.
621 var stream = new WebInspector.FileOutputStream(); 622 var stream = new WebInspector.FileOutputStream();
622 623
623 var progressIndicator = new WebInspector.ProgressIndicator(); 624 var progressIndicator = new WebInspector.ProgressIndicator();
624 progressIndicator.setTitle(WebInspector.UIString("Writing file…")); 625 progressIndicator.setTitle(WebInspector.UIString("Writing file…"));
625 progressIndicator.setTotalWork(this.itemCount()); 626 progressIndicator.setTotalWork(this.itemCount());
626 627
627 /** @const */ 628 /** @const */
628 var chunkSize = 350; 629 var chunkSize = 350;
629 var messageIndex = 0; 630 var messageIndex = 0;
630 631
(...skipping 781 matching lines...) Expand 10 before | Expand all | Expand 10 after
1412 return true; 1413 return true;
1413 } 1414 }
1414 return false; 1415 return false;
1415 } 1416 }
1416 } 1417 }
1417 1418
1418 /** 1419 /**
1419 * @typedef {{messageIndex: number, matchIndex: number}} 1420 * @typedef {{messageIndex: number, matchIndex: number}}
1420 */ 1421 */
1421 WebInspector.ConsoleView.RegexMatchRange; 1422 WebInspector.ConsoleView.RegexMatchRange;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698