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

Side by Side Diff: Source/devtools/front_end/profiler/CanvasProfileView.js

Issue 404953004: DevTools: Refactor linkifyRawLocation to use fallback url (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Address aandrey's comments #2 Created 6 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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after
479 var callViewElement = document.createElement("div"); 479 var callViewElement = document.createElement("div");
480 480
481 var data = {}; 481 var data = {};
482 data[0] = index + 1; 482 data[0] = index + 1;
483 data[1] = callViewElement; 483 data[1] = callViewElement;
484 data[2] = ""; 484 data[2] = "";
485 if (call.sourceURL) { 485 if (call.sourceURL) {
486 // FIXME(62725): stack trace line/column numbers are one-based. 486 // FIXME(62725): stack trace line/column numbers are one-based.
487 var lineNumber = Math.max(0, call.lineNumber - 1) || 0; 487 var lineNumber = Math.max(0, call.lineNumber - 1) || 0;
488 var columnNumber = Math.max(0, call.columnNumber - 1) || 0; 488 var columnNumber = Math.max(0, call.columnNumber - 1) || 0;
489 data[2] = this._linkifier.linkifyLocation(this.profile.target(), cal l.sourceURL, lineNumber, columnNumber); 489 data[2] = this._linkifier.linkifyScriptLocation(this.profile.target( ), null, call.sourceURL, lineNumber, columnNumber);
490 } 490 }
491 491
492 callViewElement.createChild("span", "canvas-function-name").textContent = call.functionName || "context." + call.property; 492 callViewElement.createChild("span", "canvas-function-name").textContent = call.functionName || "context." + call.property;
493 493
494 if (call.arguments) { 494 if (call.arguments) {
495 callViewElement.createTextChild("("); 495 callViewElement.createTextChild("(");
496 for (var i = 0, n = call.arguments.length; i < n; ++i) { 496 for (var i = 0, n = call.arguments.length; i < n; ++i) {
497 var argument = /** @type {!CanvasAgent.CallArgument} */ (call.ar guments[i]); 497 var argument = /** @type {!CanvasAgent.CallArgument} */ (call.ar guments[i]);
498 if (i) 498 if (i)
499 callViewElement.createTextChild(", "); 499 callViewElement.createTextChild(", ");
(...skipping 772 matching lines...) Expand 10 before | Expand all | Expand 10 after
1272 }, 1272 },
1273 1273
1274 clearResourceStates: function() 1274 clearResourceStates: function()
1275 { 1275 {
1276 this._currentResourceStates = {}; 1276 this._currentResourceStates = {};
1277 this.dispatchEventToListeners(WebInspector.CanvasTraceLogPlayerProxy.Eve nts.CanvasReplayStateChanged); 1277 this.dispatchEventToListeners(WebInspector.CanvasTraceLogPlayerProxy.Eve nts.CanvasReplayStateChanged);
1278 }, 1278 },
1279 1279
1280 __proto__: WebInspector.Object.prototype 1280 __proto__: WebInspector.Object.prototype
1281 } 1281 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/profiler/CPUProfileDataGrid.js ('k') | Source/devtools/front_end/profiler/HeapSnapshotGridNodes.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698