We increment the user initiated profile count in the Web Inspector's JS, but this causes problems as it's incremented every time we display the log message, and is only currently working by being very careful to clear messages and the count at the right time. We should move this into the InspectorController
Created attachment 24126 [details] Proposed patch
Comment on attachment 24126 [details] Proposed patch I am not sure m_startedProfileNumber is a good name. Maybe m_runningUserInitiatedProfileNumber, m_recordingUserInitiatedProfileNumber or m_activeUserInitiatedProfileNumber? 137 if (profile.title.indexOf(UserInitiatedProfileName) != 0) { Use !== here. 237 if (title.indexOf(UserInitiatedProfileName, 0) == 0) { Use === here. 238 title = WebInspector.UIString("Profile %d", title.substring(35)); Use UserInitiatedProfileName.length instead of the magic number. 380 if (this.profile.title.indexOf(UserInitiatedProfileName, 0) == 0) 381 this._profileNumber = this.profile.title.substring(35); Same applies here: === and no magic number. Also indexOf only takes 1 argument. 398 if (this.profile.title.indexOf(UserInitiatedProfileName, 0) == 0) The indexOf function only takes 1 argument and use ===. 443 console.log("followLink"); r=me to remove that console.log in a separate commit. r- for now.
Created attachment 24127 [details] New patch with changes
Comment on attachment 24127 [details] New patch with changes r=me
Comment on attachment 24127 [details] New patch with changes nextUserInitiatedProfileNumber should be m_ nextUserInitiatedProfileNumber.
Committed revision 37349.