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

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

Issue 23861007: DevTools: Fix console output for native functions like Math.random (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Comments addressed Created 7 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « LayoutTests/inspector/console/console-native-function-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 601 matching lines...) Expand 10 before | Expand all | Expand 10 after
612 if (error) { 612 if (error) {
613 console.error(error); 613 console.error(error);
614 addMessage.call(this); 614 addMessage.call(this);
615 return; 615 return;
616 } 616 }
617 617
618 var url; 618 var url;
619 var lineNumber; 619 var lineNumber;
620 var columnNumber; 620 var columnNumber;
621 var script = WebInspector.debuggerModel.scriptForId(response.locatio n.scriptId); 621 var script = WebInspector.debuggerModel.scriptForId(response.locatio n.scriptId);
622 console.assert(script); 622 if (script && script.sourceURL) {
623 if (script.sourceURL) {
624 url = script.sourceURL; 623 url = script.sourceURL;
625 lineNumber = response.location.lineNumber + 1; 624 lineNumber = response.location.lineNumber + 1;
626 columnNumber = response.location.columnNumber + 1; 625 columnNumber = response.location.columnNumber + 1;
627 } 626 }
628 addMessage.call(this, url, lineNumber, columnNumber); 627 addMessage.call(this, url, lineNumber, columnNumber);
629 } 628 }
630 }, 629 },
631 630
632 /** 631 /**
633 * @param {string} text 632 * @param {string} text
(...skipping 597 matching lines...) Expand 10 before | Expand all | Expand 10 after
1231 1230
1232 /** 1231 /**
1233 * @type {?WebInspector.ConsoleView} 1232 * @type {?WebInspector.ConsoleView}
1234 */ 1233 */
1235 WebInspector.consoleView = null; 1234 WebInspector.consoleView = null;
1236 1235
1237 WebInspector.ConsoleMessage.create = function(source, level, message, type, url, line, column, repeatCount, parameters, stackTrace, requestId, isOutdated) 1236 WebInspector.ConsoleMessage.create = function(source, level, message, type, url, line, column, repeatCount, parameters, stackTrace, requestId, isOutdated)
1238 { 1237 {
1239 return new WebInspector.ConsoleMessageImpl(source, level, message, WebInspec tor.consoleView._linkifier, type, url, line, column, repeatCount, parameters, st ackTrace, requestId, isOutdated); 1238 return new WebInspector.ConsoleMessageImpl(source, level, message, WebInspec tor.consoleView._linkifier, type, url, line, column, repeatCount, parameters, st ackTrace, requestId, isOutdated);
1240 } 1239 }
OLDNEW
« no previous file with comments | « LayoutTests/inspector/console/console-native-function-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698