Bug 98547 - Clipboard::types() should return an ordered collection.
Summary: Clipboard::types() should return an ordered collection.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: UI Events (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Andreas Kling
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-05 12:29 PDT by Andreas Kling
Modified: 2012-10-06 12:14 PDT (History)
11 users (show)

See Also:


Attachments
Patch? (18.37 KB, patch)
2012-10-05 12:40 PDT, Andreas Kling
peter+ews: commit-queue-
Details | Formatted Diff | Diff
Patch?? (18.59 KB, patch)
2012-10-05 13:21 PDT, Andreas Kling
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Kling 2012-10-05 12:29:56 PDT
Since we expose Clipboard::types() to the web, we should handle it using an ordered collection internally.
When lowering the default minimum table size for WTF hash tables, some web-exposed string arrays got reordered because the HashSet<String> returned by Clipboard::types() got reordered in rehash.
Comment 1 Andreas Kling 2012-10-05 12:40:29 PDT
Created attachment 167368 [details]
Patch?
Comment 2 Peter Beverloo (cr-android ews) 2012-10-05 13:02:37 PDT
Comment on attachment 167368 [details]
Patch?

Attachment 167368 [details] did not pass cr-android-ews (chromium-android):
Output: http://queues.webkit.org/results/14179576
Comment 3 WebKit Review Bot 2012-10-05 13:09:11 PDT
Comment on attachment 167368 [details]
Patch?

Attachment 167368 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://queues.webkit.org/results/14179582
Comment 4 Andreas Kling 2012-10-05 13:21:32 PDT
Created attachment 167372 [details]
Patch??
Comment 5 Rafael Brandao 2012-10-05 15:20:47 PDT
Awesome patch! Incredible how we ever returned them ordered by insertion. :-)
Comment 6 Darin Adler 2012-10-05 18:12:43 PDT
Comment on attachment 167372 [details]
Patch??

Why not Vector<String>? I can’t imagine that the types vector ever gets so long that the hash table is an important optimization.
Comment 7 WebKit Review Bot 2012-10-06 12:14:05 PDT
Comment on attachment 167372 [details]
Patch??

Clearing flags on attachment: 167372

Committed r130588: <http://trac.webkit.org/changeset/130588>
Comment 8 WebKit Review Bot 2012-10-06 12:14:10 PDT
All reviewed patches have been landed.  Closing bug.