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

Description Joseph Pecoraro 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.
Comment 1 Joseph Pecoraro 2015-04-21 17:51:16 PDT
Created attachment 251282 [details]
[PATCH] Proposed Fix
Comment 2 WebKit Commit Bot 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>
Comment 3 WebKit Commit Bot 2015-04-21 19:38:20 PDT
All reviewed patches have been landed.  Closing bug.