Bug 152270 - Web Inspector: Copy message from console with a stack trace does not include source code locations
Summary: Web Inspector: Copy message from console with a stack trace does not include ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Joseph Pecoraro
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2015-12-14 14:05 PST by Joseph Pecoraro
Modified: 2015-12-14 15:10 PST (History)
8 users (show)

See Also:


Attachments
[PATCH] Proposed Fix (1.90 KB, patch)
2015-12-14 14:10 PST, Joseph Pecoraro
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.