Skip to content
  • enne@google.com's avatar
    Remove implicit copy constructor usage in HashMaps with OwnPtr · 991c923a
    enne@google.com authored
    https://bugs.webkit.org/show_bug.cgi?id=78071
    
    Reviewed by Darin Adler.
    
    Change the return type of emptyValue() in PairHashTraits to be the
    actual type returned rather than the trait type to avoid an implicit
    generation of the OwnPtr copy constructor. This happens for hash
    traits involving OwnPtr where the empty value is not zero and each
    hash bucket needs to be initialized with emptyValue().
    
    Also, update StructureTransitionTable to use default hash traits
    rather than rolling its own, in order to update it to handle
    EmptyValueType.
    
    Test: patch from bug 74154 compiles on Clang with this patch
    
    * runtime/StructureTransitionTable.h:
    (StructureTransitionTable):
    * wtf/HashTraits.h:
    (GenericHashTraits):
    (PairHashTraits):
    (WTF::PairHashTraits::emptyValue):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@107421 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    991c923a