Bug 20322 - XHRs logged in the console do not have line numbers
Summary: XHRs logged in the console do not have line numbers
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Kevin McCullough
Keywords: InRadar
Depends on:
Blocks: 17776
  Show dependency treegraph
Reported: 2008-08-07 13:50 PDT by Kevin McCullough
Modified: 2008-09-25 09:05 PDT (History)
0 users

See Also:

proposed patch (3.36 KB, patch)
2008-09-24 16:49 PDT, Kevin McCullough
ggaren: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin McCullough 2008-08-07 13:50:40 PDT
8/5/08 11:04 AM Kevin McCullough:
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.