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

Side by Side Diff: Source/devtools/front_end/console/ConsoleView.js

Issue 566883002: [DevTools] Report correct syntax error location for evaluated in console script (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 2 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 810 matching lines...) Expand 10 before | Expand all | Expand 10 after
821 * @param {number=} lineNumber 821 * @param {number=} lineNumber
822 * @param {number=} columnNumber 822 * @param {number=} columnNumber
823 */ 823 */
824 function addMessage(url, lineNumber, columnNumber) 824 function addMessage(url, lineNumber, columnNumber)
825 { 825 {
826 var level = wasThrown ? WebInspector.ConsoleMessage.MessageLevel.Err or : WebInspector.ConsoleMessage.MessageLevel.Log; 826 var level = wasThrown ? WebInspector.ConsoleMessage.MessageLevel.Err or : WebInspector.ConsoleMessage.MessageLevel.Log;
827 var message; 827 var message;
828 if (!wasThrown) 828 if (!wasThrown)
829 message = new WebInspector.ConsoleMessage(target, WebInspector.C onsoleMessage.MessageSource.JS, level, "", WebInspector.ConsoleMessage.MessageTy pe.Result, url, lineNumber, columnNumber, undefined, [result]); 829 message = new WebInspector.ConsoleMessage(target, WebInspector.C onsoleMessage.MessageSource.JS, level, "", WebInspector.ConsoleMessage.MessageTy pe.Result, url, lineNumber, columnNumber, undefined, [result]);
830 else 830 else
831 message = new WebInspector.ConsoleMessage(target, WebInspector.C onsoleMessage.MessageSource.JS, level, exceptionDetails.text, WebInspector.Conso leMessage.MessageType.Result, exceptionDetails.url, exceptionDetails.line, excep tionDetails.column, undefined, [WebInspector.UIString("Uncaught"), result], exce ptionDetails.stackTrace); 831 message = new WebInspector.ConsoleMessage(target, WebInspector.C onsoleMessage.MessageSource.JS, level, exceptionDetails.text, WebInspector.Conso leMessage.MessageType.Result, exceptionDetails.url, exceptionDetails.line, excep tionDetails.column, undefined, [WebInspector.UIString("Uncaught"), result], exce ptionDetails.stackTrace, undefined, undefined, undefined, undefined, exceptionDe tails.scriptId);
832 message.setOriginatingMessage(originatingConsoleMessage); 832 message.setOriginatingMessage(originatingConsoleMessage);
833 target.consoleModel.addMessage(message); 833 target.consoleModel.addMessage(message);
834 } 834 }
835 835
836 if (result.type !== "function") { 836 if (result.type !== "function") {
837 addMessage(); 837 addMessage();
838 return; 838 return;
839 } 839 }
840 840
841 result.functionDetails(didGetDetails); 841 result.functionDetails(didGetDetails);
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after
1259 WebInspector.ConsoleView.ShowConsoleActionDelegate.prototype = { 1259 WebInspector.ConsoleView.ShowConsoleActionDelegate.prototype = {
1260 /** 1260 /**
1261 * @return {boolean} 1261 * @return {boolean}
1262 */ 1262 */
1263 handleAction: function() 1263 handleAction: function()
1264 { 1264 {
1265 WebInspector.console.show(); 1265 WebInspector.console.show();
1266 return true; 1266 return true;
1267 } 1267 }
1268 } 1268 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698