Bug 97733 - ApplicationCacheStorage does not optimilay handle 8 bit strings
Summary: ApplicationCacheStorage does not optimilay handle 8 bit strings
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Page Loading (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Michael Saboff
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-26 15:19 PDT by Michael Saboff
Modified: 2022-02-28 03:43 PST (History)
2 users (show)

See Also:


Attachments
Patch (3.84 KB, patch)
2012-09-26 16:02 PDT, Michael Saboff
ap: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Saboff 2012-09-26 15:19:39 PDT
I several places, ApplicationCacheStorage calls characters() on strings, which will up convert an 8 bit string to 16 bits.
Comment 1 Michael Saboff 2012-09-26 16:02:07 PDT
Created attachment 165890 [details]
Patch
Comment 2 Darin Adler 2012-09-27 10:51:37 PDT
Comment on attachment 165890 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=165890&action=review

> Source/WebCore/ChangeLog:3
> +        ApplicationCacheStorage does not properly handle 8 bit strings

In the future for patches like this I suggest more precise phrasing, because the code did correctly work if passed 8 bit strings before.

I’d say something more like “converts 8-bit strings into 16-bit unnecessarily” or mention performance. The phrase “does not properly handle” sounds like we’ll get incorrect results, but this patch is about performance optimization, not correctness.
Comment 3 Michael Saboff 2012-09-27 12:04:44 PDT
Committed r129786: <http://trac.webkit.org/changeset/129786>