[Webkit-unassigned] [Bug 21818] New: Should be able to use AtomicString as the key for a HashMap and HashSet

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Oct 22 17:20:38 PDT 2008


https://bugs.webkit.org/show_bug.cgi?id=21818

           Summary: Should be able to use AtomicString as the key for a
                    HashMap and HashSet
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Text
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: simon.fraser at apple.com


It's currently not possible to use an AtomicString as the key for a HashMap or
HashSet; AtomicStringImpl is used instead (which is just a StringImpl).

This has the unfortunate side-effect that, even while an item in the hash is
live, all AtomicStrings referencing the key can go out of scope, leaving the
key dangling. The next matching AtomicString will pick up a new
AtomicStringImpl, but this will no longer match the hash entry.

The solution is to allow AtomicString as the hash key. This would require
implementing hash functions for AtomicString, which should be easy (they can
just call through to the impl).


-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list