Bug 20322

Summary: XHRs logged in the console do not have line numbers
Product: WebKit Reporter: Kevin McCullough <kmccullough>
Component: Web Inspector (Deprecated)Assignee: Kevin McCullough <kmccullough>
Status: RESOLVED FIXED    
Severity: Normal Keywords: InRadar
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 17776    
Attachments:
Description Flags
proposed patch ggaren: review+

Description Kevin McCullough 2008-08-07 13:50:40 PDT
8/5/08 11:04 AM Kevin McCullough:
* SUMMARY
In the console an XHR that is logged does not have line numbers so when clicking the URL of the resource that loaded it, the user is not taken to the line where the load occurred.  This is a feature that works in Firebug.

<rdar://problem/6126262 >
Comment 1 Kevin McCullough 2008-09-24 16:49:40 PDT
Created attachment 23770 [details]
proposed patch
Comment 2 Geoffrey Garen 2008-09-24 16:54:56 PDT
Comment on attachment 23770 [details]
proposed patch

This work seems harmless enough that it's OK to do even when the develop menu is disabled. Perhaps a Shark profile will tell us otherwise in the future.
Comment 3 Timothy Hatcher 2008-09-24 20:13:34 PDT
You need to check the line number for -1, the error case. Otherwise storing it in the unsigned will give a huge number. The inspector expects 0 for unknown line numbers, not -1.

This is done in Console.cpp like:

    lineNumber = (signedLineNumber >= 0 ? signedLineNumber : 0);
Comment 4 Kevin McCullough 2008-09-25 09:05:03 PDT
Committed revision 36894.