Bug 23022 - Fix multiple issues with appcache online whitelist handling
Summary: Fix multiple issues with appcache online whitelist handling
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Alexey Proskuryakov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-29 03:41 PST by Alexey Proskuryakov
Modified: 2009-01-02 03:13 PST (History)
1 user (show)

See Also:


Attachments
proposed patch (13.41 KB, patch)
2008-12-29 03:57 PST, Alexey Proskuryakov
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey Proskuryakov 2008-12-29 03:41:35 PST
Patch forthcoming.
Comment 1 Alexey Proskuryakov 2008-12-29 03:57:26 PST
Created attachment 26288 [details]
proposed patch
Comment 2 Darin Adler 2008-12-30 10:34:54 PST
Comment on attachment 26288 [details]
proposed patch

> +    unsigned whitelistSize = m_onlineWhitelist.size();
> +    for (unsigned i = 0; i < whitelistSize; ++i) {

We normally use size_t to iterate vectors.

> +        unsigned whitelistSize = onlineWhitelist.size();
> +        for (unsigned i = 0; i < whitelistSize; ++i) {

Ditto.

For scaling, with large whitelists, it seems we might want to come up with a hash function so we can use a hashed set rather than a vector.

> +# This should work normally.
> +counter.php?uncached
> \ No newline at end of file

Can we add a newline?

r=me
Comment 3 Alexey Proskuryakov 2008-12-30 10:57:52 PST
(In reply to comment #2)
> For scaling, with large whitelists, it seems we might want to come up with a
> hash function so we can use a hashed set rather than a vector.

I'm not aware of any way to use a hash function for prefix matching. We could use a tree though.

But I doubt that whitelists will be very large.

> > +# This should work normally.
> > +counter.php?uncached
> > \ No newline at end of file
> 
> Can we add a newline?

I didn't add it intentionally - I wanted to have a test for parsing such a manifest.
Comment 4 Alexey Proskuryakov 2009-01-02 03:13:04 PST
Committed revision 39548.