Summary: | Refactor user initiated profile count to be more stable | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Kevin McCullough <kmccullough> | ||||||
Component: | Web Inspector (Deprecated) | Assignee: | Kevin McCullough <kmccullough> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | ||||||||
Priority: | P2 | ||||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | Mac | ||||||||
OS: | OS X 10.5 | ||||||||
Attachments: |
|
Description
Kevin McCullough
2008-10-06 14:50:53 PDT
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. |