Bug 152270

Summary: Web Inspector: Copy message from console with a stack trace does not include source code locations
Product: WebKit Reporter: Joseph Pecoraro <joepeck>
Component: Web InspectorAssignee: Joseph Pecoraro <joepeck>
Status: RESOLVED FIXED    
Severity: Normal CC: bburg, commit-queue, graouts, joepeck, mattbaker, nvasilyev, timothy, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
Attachments:
Description Flags
[PATCH] Proposed Fix none

Description Joseph Pecoraro 2015-12-14 14:05:29 PST
* SUMMARY
Copy message from console with a stack trace does not include source code locations.

* STEPS TO REPRODUCE
1. Load test case
2. Select both console messages
3. Copy
4. Paste somewhere
  => Missing source code locations for frames

* ACTUAL RESULTS

> [Log] console.trace()
> 	bar
> 	foo
> 	(anonymous function)
> [Error] TypeError: undefined is not an object (evaluating '({}).x.x')
> 	bar2
> 	foo2
> 	(anonymous function)

* EXPECTED RESULTS

> [Log] console.trace()
> 	bar (trace.html:7)
> 	foo (trace.html:3)
> 	(anonymous function) (trace.html:11)
> [Error] TypeError: undefined is not an object (evaluating '({}).x.x')
> 	bar2 (trace.html:18)
> 	foo2 (trace.html:14)
> 	(anonymous function) (trace.html:22)

* TEST
<script>
function foo() {
    bar();
}

function bar() {
    console.trace();
}

// Trace
foo();

function foo2() {
    bar2();
}

function bar2() {
    ({}).x.x;
}

// Exception
foo2();
</script>
Comment 1 Radar WebKit Bug Importer 2015-12-14 14:06:00 PST
<rdar://problem/23888682>
Comment 2 Joseph Pecoraro 2015-12-14 14:10:25 PST
Created attachment 267320 [details]
[PATCH] Proposed Fix
Comment 3 WebKit Commit Bot 2015-12-14 15:10:47 PST
Comment on attachment 267320 [details]
[PATCH] Proposed Fix

Clearing flags on attachment: 267320

Committed r194066: <http://trac.webkit.org/changeset/194066>
Comment 4 WebKit Commit Bot 2015-12-14 15:10:50 PST
All reviewed patches have been landed.  Closing bug.