Bug 21252 - calling console.profile() with a title that is 2 chars or shorter does not linkify it
Summary: calling console.profile() with a title that is 2 chars or shorter does not li...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.5
: P2 Normal
Assignee: Kevin McCullough
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2008-09-30 13:20 PDT by Kevin McCullough
Modified: 2008-09-30 15:32 PDT (History)
0 users

See Also:


Attachments
Proposed patch (1.50 KB, patch)
2008-09-30 15:29 PDT, Kevin McCullough
kmccullough: 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-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