Bug 144025

Summary: Web Inspector: Use String.prototype.startsWith in more places
Product: WebKit Reporter: Joseph Pecoraro <joepeck>
Component: Web InspectorAssignee: Joseph Pecoraro <joepeck>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, graouts, joepeck, jonowells, mattbaker, nvasilyev, timothy, webkit-bug-importer
Priority: P2 Keywords: DoNotImportToRadar
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
[PATCH] Proposed Fix none

Joseph Pecoraro
Reported 2015-04-21 17:50:15 PDT
* SUMMARY Use String.prototype.startsWith in more places. Checking `"haystack".indexOf("needle") === 0` may be less efficient, but certainly is less readable, then `"haystack".startsWith("needle")` which can bail after the first character comparison.
Attachments
[PATCH] Proposed Fix (2.87 KB, patch)
2015-04-21 17:51 PDT, Joseph Pecoraro
no flags
Joseph Pecoraro
Comment 1 2015-04-21 17:51:16 PDT
Created attachment 251282 [details] [PATCH] Proposed Fix
WebKit Commit Bot
Comment 2 2015-04-21 19:38:15 PDT
Comment on attachment 251282 [details] [PATCH] Proposed Fix Clearing flags on attachment: 251282 Committed r183092: <http://trac.webkit.org/changeset/183092>
WebKit Commit Bot
Comment 3 2015-04-21 19:38:20 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.