Skip to content
Permalink
Browse files
Web Inspector: Copy message from console with a stack trace does not …
…include source code locations

https://bugs.webkit.org/show_bug.cgi?id=152270

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-12-14
Reviewed by Timothy Hatcher.

* UserInterface/Views/ConsoleMessageView.js:
(WebInspector.ConsoleMessageView.prototype.toClipboardString):
When the the StackTrace was upgraded to a real collection of CallFrame
object's the CallFrame's got real SourceCodeLocation properties.

Canonical link: https://commits.webkit.org/170385@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@194066 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
JosephPecoraro authored and webkit-commit-queue committed Dec 14, 2015
1 parent 51d47df commit 265fa9480a747b27e6615dfbf476294d465d0eef
Showing with 14 additions and 2 deletions.
  1. +12 −0 Source/WebInspectorUI/ChangeLog
  2. +2 −2 Source/WebInspectorUI/UserInterface/Views/ConsoleMessageView.js
@@ -1,3 +1,15 @@
2015-12-14 Joseph Pecoraro <pecoraro@apple.com>

Web Inspector: Copy message from console with a stack trace does not include source code locations
https://bugs.webkit.org/show_bug.cgi?id=152270

Reviewed by Timothy Hatcher.

* UserInterface/Views/ConsoleMessageView.js:
(WebInspector.ConsoleMessageView.prototype.toClipboardString):
When the the StackTrace was upgraded to a real collection of CallFrame
object's the CallFrame's got real SourceCodeLocation properties.

2015-12-13 Matt Baker <mattbaker@apple.com>

Web Inspector: Make TimelineOverview's graph container a subview
@@ -196,8 +196,8 @@ WebInspector.ConsoleMessageView = class ConsoleMessageView extends WebInspector.
if (hasStackTrace) {
this._message.stackTrace.callFrames.forEach(function(frame) {
clipboardString += "\n\t" + (frame.functionName || WebInspector.UIString("(anonymous function)"));
if (frame.url)
clipboardString += " (" + WebInspector.displayNameForURL(frame.url) + ", line " + frame.lineNumber + ")";
if (frame.sourceCodeLocation)
clipboardString += " (" + frame.sourceCodeLocation.originalLocationString() + ")";
});
} else {
let repeatString = this.repeatCount > 1 ? "x" + this.repeatCount : "";

0 comments on commit 265fa94

Please sign in to comment.