Bug 21252

Summary: calling console.profile() with a title that is 2 chars or shorter does not linkify it
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: Mac   
OS: OS X 10.5   
Attachments:
Description Flags
Proposed patch kmccullough: review+

Description Kevin McCullough 2008-09-30 13:20:59 PDT
* SUMMARY
In the Inspector's console you can type console.profile/End() with and without a title.  Either way gives you the wrong title.

* STEPS TO REPRODUCE
1. Open a page with some JS on it like (http://www.asia.com/cheap-flights-1/deals/Hawaiian-Flights-Discount-Fares?gclid=CO_YvqHloZQCFSQbagodWAYMtw)
2. Open the inspector and go to the Profiles panel.
3. In the console type "console.profile()" then click around on the site to engage some JS
4. In the console type "console.profileEnd()" to stop the profile.
5. Exercise some more JS on the page to get the profile to appear (see 6160740)

* RESULTS
If you did not provide a title the profile's title will be "undefined" instead of "Profile X" where X is the number of user initiated profiles currently present (should be 1).

If you do all the steps but change 3 and 4 to include a title (e.g. "console.profile('hi') and console.profileEnd('hi')) you will see a message in the console that says "Profile "webkit-profile://hi/5" finished.".  It should not show the "webkit-profile://" or the "/5" but instead make that a clickable link

upon reflection this works fine with other titles, it is related to the string "hi". Dun Dun Dun!

<rdar://problem/6160767
Comment 1 Kevin McCullough 2008-09-30 15:29:09 PDT
Created attachment 23957 [details]
Proposed patch
Comment 2 Kevin McCullough 2008-09-30 15:32:21 PDT
r=Tim Hatcher

Committed revision 37120.
Comment 3 Kevin McCullough 2008-09-30 15:32:34 PDT
Comment on attachment 23957 [details]
Proposed patch

r=Tim Hatcher