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

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

Issue 402873002: DevTools: Build function details' raw location in DebuggerModel (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Comment addressed Created 6 years, 5 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
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 787 matching lines...) Expand 10 before | Expand all | Expand 10 after
798 } 798 }
799 799
800 if (result.type !== "function") { 800 if (result.type !== "function") {
801 addMessage(); 801 addMessage();
802 return; 802 return;
803 } 803 }
804 804
805 result.functionDetails(didGetDetails); 805 result.functionDetails(didGetDetails);
806 806
807 /** 807 /**
808 * @param {?DebuggerAgent.FunctionDetails} response 808 * @param {?WebInspector.DebuggerModel.FunctionDetails} response
809 */ 809 */
810 function didGetDetails(response) 810 function didGetDetails(response)
811 { 811 {
812 if (!response) { 812 if (!response || !response.location) {
813 addMessage(); 813 addMessage();
814 return; 814 return;
815 } 815 }
816 816
817 var url; 817 var url;
818 var lineNumber;
819 var columnNumber;
820 var script = target.debuggerModel.scriptForId(response.location.scri ptId); 818 var script = target.debuggerModel.scriptForId(response.location.scri ptId);
821 if (script && script.sourceURL) { 819 if (script && script.sourceURL)
822 url = script.sourceURL; 820 url = script.sourceURL;
823 lineNumber = response.location.lineNumber + 1;
824 columnNumber = response.location.columnNumber + 1;
825 }
826 // FIXME: this should be using live location. 821 // FIXME: this should be using live location.
827 addMessage(url, lineNumber, columnNumber); 822 addMessage(url, response.location.lineNumber, response.location.colu mnNumber);
828 } 823 }
829 }, 824 },
830 825
831 /** 826 /**
832 * @param {string} text 827 * @param {string} text
833 * @param {boolean} useCommandLineAPI 828 * @param {boolean} useCommandLineAPI
834 */ 829 */
835 _appendCommand: function(text, useCommandLineAPI) 830 _appendCommand: function(text, useCommandLineAPI)
836 { 831 {
837 832
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after
1217 WebInspector.ConsoleView.ShowConsoleActionDelegate.prototype = { 1212 WebInspector.ConsoleView.ShowConsoleActionDelegate.prototype = {
1218 /** 1213 /**
1219 * @return {boolean} 1214 * @return {boolean}
1220 */ 1215 */
1221 handleAction: function() 1216 handleAction: function()
1222 { 1217 {
1223 WebInspector.consoleModel.show(); 1218 WebInspector.consoleModel.show();
1224 return true; 1219 return true;
1225 } 1220 }
1226 } 1221 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/components/ObjectPropertiesSection.js ('k') | Source/devtools/front_end/main/Main.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698