| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2012 Intel Inc. All rights reserved. | 3 * Copyright (C) 2012 Intel Inc. All rights reserved. |
| 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 are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * 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 544 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 555 * @param {string} title | 555 * @param {string} title |
| 556 * @param {!Array.<!ConsoleAgent.CallFrame>} stackTrace | 556 * @param {!Array.<!ConsoleAgent.CallFrame>} stackTrace |
| 557 */ | 557 */ |
| 558 appendStackTrace: function(title, stackTrace) | 558 appendStackTrace: function(title, stackTrace) |
| 559 { | 559 { |
| 560 if (!this._linkifier || !this._target) | 560 if (!this._linkifier || !this._target) |
| 561 return; | 561 return; |
| 562 | 562 |
| 563 var rowElement = this.element.createChild("div", "timeline-details-view-
row"); | 563 var rowElement = this.element.createChild("div", "timeline-details-view-
row"); |
| 564 rowElement.createChild("span", "timeline-details-view-row-title").textCo
ntent = WebInspector.UIString("%s: ", title); | 564 rowElement.createChild("span", "timeline-details-view-row-title").textCo
ntent = WebInspector.UIString("%s: ", title); |
| 565 var stackTraceElement = rowElement.createChild("div", "timeline-details-
view-row-stack-trace monospace"); | 565 this.createChildStackTraceElement(rowElement, stackTrace); |
| 566 }, |
| 566 | 567 |
| 568 /** |
| 569 * @param {!Element} parentElement |
| 570 * @param {!Array.<!ConsoleAgent.CallFrame>} stackTrace |
| 571 */ |
| 572 createChildStackTraceElement: function(parentElement, stackTrace) |
| 573 { |
| 574 var stackTraceElement = parentElement.createChild("div", "timeline-detai
ls-view-row-stack-trace monospace"); |
| 567 for (var i = 0; i < stackTrace.length; ++i) { | 575 for (var i = 0; i < stackTrace.length; ++i) { |
| 568 var stackFrame = stackTrace[i]; | 576 var stackFrame = stackTrace[i]; |
| 569 var row = stackTraceElement.createChild("div"); | 577 var row = stackTraceElement.createChild("div"); |
| 570 row.createTextChild(stackFrame.functionName || WebInspector.UIString
("(anonymous function)")); | 578 row.createTextChild(stackFrame.functionName || WebInspector.UIString
("(anonymous function)")); |
| 571 row.createTextChild(" @ "); | 579 row.createTextChild(" @ "); |
| 572 var urlElement = this._linkifier.linkifyScriptLocation(this._target,
stackFrame.scriptId, stackFrame.url, stackFrame.lineNumber - 1, stackFrame.colu
mnNumber - 1); | 580 var urlElement = this._linkifier.linkifyScriptLocation(this._target,
stackFrame.scriptId, stackFrame.url, stackFrame.lineNumber - 1, stackFrame.colu
mnNumber - 1); |
| 573 row.appendChild(urlElement); | 581 row.appendChild(urlElement); |
| 574 } | 582 } |
| 575 } | 583 } |
| 576 } | 584 } |
| OLD | NEW |