<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>109977</bug_id>
          
          <creation_ts>2013-02-15 15:26:31 -0800</creation_ts>
          <short_desc>Add HashMap::isGoodKey and HashSet::isGoodValue</short_desc>
          <delta_ts>2013-02-15 17:02:39 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>New Bugs</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Anders Carlsson">andersca</reporter>
          <assigned_to name="Anders Carlsson">andersca</assigned_to>
          <cc>benjamin</cc>
    
    <cc>cmarcelo</cc>
    
    <cc>darin</cc>
    
    <cc>ojan.autocc</cc>
    
    <cc>webkit.review.bot</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>834421</commentid>
    <comment_count>0</comment_count>
    <who name="Anders Carlsson">andersca</who>
    <bug_when>2013-02-15 15:26:31 -0800</bug_when>
    <thetext>Add HashMap::isGoodKey and HashSet::isGoodValue</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>834427</commentid>
    <comment_count>1</comment_count>
      <attachid>188655</attachid>
    <who name="Anders Carlsson">andersca</who>
    <bug_when>2013-02-15 15:45:08 -0800</bug_when>
    <thetext>Created attachment 188655
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>834447</commentid>
    <comment_count>2</comment_count>
      <attachid>188655</attachid>
    <who name="Sam Weinig">sam</who>
    <bug_when>2013-02-15 16:05:39 -0800</bug_when>
    <thetext>Comment on attachment 188655
Patch

Nice, I should have done this awhile ago.  Do you think we should call it isValidKey().</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>834449</commentid>
    <comment_count>3</comment_count>
      <attachid>188655</attachid>
    <who name="Darin Adler">darin</who>
    <bug_when>2013-02-15 16:09:09 -0800</bug_when>
    <thetext>Comment on attachment 188655
Patch

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

More comments to come, but since Sam just gave you review+ I rushed to get these comments in.

&gt; Source/WTF/ChangeLog:14
&gt; +        (HashMap):
&gt; +        (WTF::::isGoodKey):
&gt; +        (WTF):

Yuck, please delete or fix this.

&gt; Source/WTF/ChangeLog:18
&gt; +        (HashSet):
&gt; +        (WTF):
&gt; +        (WTF::::isGoodValue):

Yuck, please delete or fix this.

&gt; Source/WTF/wtf/HashMap.h:419
&gt;      template&lt;typename T, typename U, typename V, typename W, typename X&gt;
&gt; +    inline bool HashMap&lt;T, U, V, W, X&gt;::isGoodKey(const KeyType&amp; key)
&gt; +    {
&gt; +        return key != KeyTraits::emptyValue() &amp;&amp; !KeyTraits::isDeletedValue(key);
&gt; +    }

I believe this function is not safe for all types. Our hash tables support types where it is not safe to compare with empty using == or != and the traits identify such types. It’s tricky for a hash map user to know you can’t call this newly added function on all maps. I don’t know whether it will be a compile time failure or runtime failure. I’d prefer a brief comment about this just above the declaration.

&gt; Source/WTF/wtf/HashSet.h:218
&gt; +    template&lt;typename T, typename U, typename V&gt;
&gt; +    bool HashSet&lt;T, U, V&gt;::isGoodValue(const ValueType&amp; value)
&gt; +    {
&gt; +        return value != ValueTraits::emptyValue() &amp;&amp; !ValueTraits::isDeletedValue(value);
&gt; +    }

Did you intentionally choose not to inline this? I ask because you marked the HashMap version inline.

Also, same concerns as for the HashMap function.

&gt; Source/WebKit2/UIProcess/WebProcessProxy.cpp:75
&gt; -    static uint64_t uniquePageID = 1;
&gt; -    return uniquePageID++;
&gt; +    static uint64_t uniquePageID;
&gt; +    return ++uniquePageID;

This tweak looks fine, but unrelated to the rest of the patch. You should at least mention it in the change log.

&gt; Source/WebKit2/UIProcess/WebProcessProxy.cpp:458
&gt; -    return isGoodKey&lt;WebFrameProxyMap&gt;(frameID) ? m_frameMap.get(frameID).get() : 0;
&gt; +    if (!m_frameMap.isGoodKey(frameID))
&gt; +        return 0;
&gt; +
&gt; +    return m_frameMap.get(frameID).get();

I think it would be slightly clearer to use the type of m_frameMap here instead of using m_frameMap itself to call the static member function.

Also, is it really that much better to use an if with a return?

&gt; Source/WebKit2/UIProcess/WebProcessProxy.cpp:463
&gt; +    return m_frameMap.isGoodKey(frameID) &amp;&amp; !m_frameMap.contains(frameID);

Ditto.

&gt; Source/WebKit2/UIProcess/WebProcessProxy.cpp:477
&gt; +    ASSERT(m_frameMap.isGoodKey(frameID));

Ditto.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>834452</commentid>
    <comment_count>4</comment_count>
      <attachid>188655</attachid>
    <who name="Darin Adler">darin</who>
    <bug_when>2013-02-15 16:12:14 -0800</bug_when>
    <thetext>Comment on attachment 188655
Patch

The function that does this same operation when it can safely, as an assertion, is HashTable::checkKey. These new functions will work on some maps and sets and not on others.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>834454</commentid>
    <comment_count>5</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2013-02-15 16:12:38 -0800</bug_when>
    <thetext>Those are all of my comments.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>834457</commentid>
    <comment_count>6</comment_count>
    <who name="Benjamin Poulain">benjamin</who>
    <bug_when>2013-02-15 16:16:04 -0800</bug_when>
    <thetext>&gt; &gt; Source/WTF/wtf/HashMap.h:419
&gt; &gt;      template&lt;typename T, typename U, typename V, typename W, typename X&gt;
&gt; &gt; +    inline bool HashMap&lt;T, U, V, W, X&gt;::isGoodKey(const KeyType&amp; key)
&gt; &gt; +    {
&gt; &gt; +        return key != KeyTraits::emptyValue() &amp;&amp; !KeyTraits::isDeletedValue(key);
&gt; &gt; +    }
&gt; 
&gt; I believe this function is not safe for all types. Our hash tables support types where it is not safe to compare with empty using == or != and the traits identify such types. It’s tricky for a hash map user to know you can’t call this newly added function on all maps. I don’t know whether it will be a compile time failure or runtime failure. I’d prefer a brief comment about this just above the declaration.

This!

I am not sure HashMap is the right place because of this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>834461</commentid>
    <comment_count>7</comment_count>
    <who name="Anders Carlsson">andersca</who>
    <bug_when>2013-02-15 16:16:47 -0800</bug_when>
    <thetext>(In reply to comment #3)
&gt; (From update of attachment 188655 [details])
&gt; View in context: https://bugs.webkit.org/attachment.cgi?id=188655&amp;action=review
&gt; 
&gt; More comments to come, but since Sam just gave you review+ I rushed to get these comments in.
&gt; 
&gt; &gt; Source/WTF/wtf/HashMap.h:419
&gt; &gt;      template&lt;typename T, typename U, typename V, typename W, typename X&gt;
&gt; &gt; +    inline bool HashMap&lt;T, U, V, W, X&gt;::isGoodKey(const KeyType&amp; key)
&gt; &gt; +    {
&gt; &gt; +        return key != KeyTraits::emptyValue() &amp;&amp; !KeyTraits::isDeletedValue(key);
&gt; &gt; +    }
&gt; 
&gt; I believe this function is not safe for all types. Our hash tables support types where it is not safe to compare with empty using == or != and the traits identify such types. It’s tricky for a hash map user to know you can’t call this newly added function on all maps. I don’t know whether it will be a compile time failure or runtime failure. I’d prefer a brief comment about this just above the declaration.

Good point. I can add a COMPILE_ASSERT that safeToCompareToEmptyOrDeleted is true.

&gt; 
&gt; &gt; Source/WTF/wtf/HashSet.h:218
&gt; &gt; +    template&lt;typename T, typename U, typename V&gt;
&gt; &gt; +    bool HashSet&lt;T, U, V&gt;::isGoodValue(const ValueType&amp; value)
&gt; &gt; +    {
&gt; &gt; +        return value != ValueTraits::emptyValue() &amp;&amp; !ValueTraits::isDeletedValue(value);
&gt; &gt; +    }
&gt; 
&gt; Did you intentionally choose not to inline this? I ask because you marked the HashMap version inline.

Nope, that was just an oversight. 
&gt; 
&gt; Also, same concerns as for the HashMap function.
&gt; 
&gt; &gt; Source/WebKit2/UIProcess/WebProcessProxy.cpp:75
&gt; &gt; -    static uint64_t uniquePageID = 1;
&gt; &gt; -    return uniquePageID++;
&gt; &gt; +    static uint64_t uniquePageID;
&gt; &gt; +    return ++uniquePageID;
&gt; 
&gt; This tweak looks fine, but unrelated to the rest of the patch. You should at least mention it in the change log.
&gt; 
&gt; &gt; Source/WebKit2/UIProcess/WebProcessProxy.cpp:458
&gt; &gt; -    return isGoodKey&lt;WebFrameProxyMap&gt;(frameID) ? m_frameMap.get(frameID).get() : 0;
&gt; &gt; +    if (!m_frameMap.isGoodKey(frameID))
&gt; &gt; +        return 0;
&gt; &gt; +
&gt; &gt; +    return m_frameMap.get(frameID).get();
&gt; 
&gt; I think it would be slightly clearer to use the type of m_frameMap here instead of using m_frameMap itself to call the static member function.

I thought it was clever, but I’ll change it since we have a typedef.

&gt; 
&gt; Also, is it really that much better to use an if with a return?

I think that it’s easier to read; just my personal opinion though.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>834465</commentid>
    <comment_count>8</comment_count>
      <attachid>188655</attachid>
    <who name="Darin Adler">darin</who>
    <bug_when>2013-02-15 16:19:45 -0800</bug_when>
    <thetext>Comment on attachment 188655
Patch

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

&gt;&gt;&gt; Source/WTF/wtf/HashMap.h:419
&gt;&gt;&gt; +    }
&gt;&gt; 
&gt;&gt; I believe this function is not safe for all types. Our hash tables support types where it is not safe to compare with empty using == or != and the traits identify such types. It’s tricky for a hash map user to know you can’t call this newly added function on all maps. I don’t know whether it will be a compile time failure or runtime failure. I’d prefer a brief comment about this just above the declaration.
&gt; 
&gt; Good point. I can add a COMPILE_ASSERT that safeToCompareToEmptyOrDeleted is true.

Even when safe I am not 100% sure that you can just call isDeletedValue without involving the translator. I guess that extra complexity is only needed inside the HashTable class, not here in the HashMap and HashSet classes; translators are used to implement HashMap and the special translated add functions but probably not an issue here.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>834472</commentid>
    <comment_count>9</comment_count>
    <who name="Anders Carlsson">andersca</who>
    <bug_when>2013-02-15 16:26:26 -0800</bug_when>
    <thetext>(In reply to comment #8)
&gt; (From update of attachment 188655 [details])
&gt; View in context: https://bugs.webkit.org/attachment.cgi?id=188655&amp;action=review
&gt; 
&gt; &gt;&gt;&gt; Source/WTF/wtf/HashMap.h:419
&gt; &gt;&gt;&gt; +    }
&gt; &gt;&gt; 
&gt; &gt;&gt; I believe this function is not safe for all types. Our hash tables support types where it is not safe to compare with empty using == or != and the traits identify such types. It’s tricky for a hash map user to know you can’t call this newly added function on all maps. I don’t know whether it will be a compile time failure or runtime failure. I’d prefer a brief comment about this just above the declaration.
&gt; &gt; 
&gt; &gt; Good point. I can add a COMPILE_ASSERT that safeToCompareToEmptyOrDeleted is true.
&gt; 
&gt; Even when safe I am not 100% sure that you can just call isDeletedValue without involving the translator. I guess that extra complexity is only needed inside the HashTable class, not here in the HashMap and HashSet classes; translators are used to implement HashMap and the special translated add functions but probably not an issue here.

Right, I don’t think it’s an issue. I also though about something like:

    template&lt;typename T, typename U, typename V, typename W, typename X&gt;
    inline bool HashMap&lt;T, U, V, W, X&gt;::isValidKey(const KeyType&amp; key)
    {
        if (KeyTraits::isDeletedValue(key))
            return false;

        if (HashFunctions::safeToCompareToEmptyOrDeleted) {
            if (key == KeyTraits::emptyValue())
                return false;
            if (isHashTraitsEmptyValue&lt;KeyTraits&gt;(key))
                return false;
        }

        return true;
    }

but I’m not sure if it’s better.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>834474</commentid>
    <comment_count>10</comment_count>
      <attachid>188655</attachid>
    <who name="Darin Adler">darin</who>
    <bug_when>2013-02-15 16:27:36 -0800</bug_when>
    <thetext>Comment on attachment 188655
Patch

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

&gt;&gt;&gt;&gt;&gt; Source/WTF/wtf/HashMap.h:419
&gt;&gt;&gt;&gt;&gt; +    }
&gt;&gt;&gt;&gt; 
&gt;&gt;&gt;&gt; I believe this function is not safe for all types. Our hash tables support types where it is not safe to compare with empty using == or != and the traits identify such types. It’s tricky for a hash map user to know you can’t call this newly added function on all maps. I don’t know whether it will be a compile time failure or runtime failure. I’d prefer a brief comment about this just above the declaration.
&gt;&gt;&gt; 
&gt;&gt;&gt; Good point. I can add a COMPILE_ASSERT that safeToCompareToEmptyOrDeleted is true.
&gt;&gt; 
&gt;&gt; Even when safe I am not 100% sure that you can just call isDeletedValue without involving the translator. I guess that extra complexity is only needed inside the HashTable class, not here in the HashMap and HashSet classes; translators are used to implement HashMap and the special translated add functions but probably not an issue here.
&gt; 
&gt; Right, I don’t think it’s an issue. I also though about something like:
&gt; 
&gt;     template&lt;typename T, typename U, typename V, typename W, typename X&gt;
&gt;     inline bool HashMap&lt;T, U, V, W, X&gt;::isValidKey(const KeyType&amp; key)
&gt;     {
&gt;         if (KeyTraits::isDeletedValue(key))
&gt;             return false;
&gt; 
&gt;         if (HashFunctions::safeToCompareToEmptyOrDeleted) {
&gt;             if (key == KeyTraits::emptyValue())
&gt;                 return false;
&gt;             if (isHashTraitsEmptyValue&lt;KeyTraits&gt;(key))
&gt;                 return false;
&gt;         }
&gt; 
&gt;         return true;
&gt;     }
&gt; 
&gt; but I’m not sure if it’s better.

It’s definitely not better. A function that lies to you and returns true when it doesn’t know!!!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>834477</commentid>
    <comment_count>11</comment_count>
    <who name="Anders Carlsson">andersca</who>
    <bug_when>2013-02-15 16:28:29 -0800</bug_when>
    <thetext>Err, I meant

    template&lt;typename T, typename U, typename V, typename W, typename X&gt;
    inline bool HashMap&lt;T, U, V, W, X&gt;::isValidKey(const KeyType&amp; key)
    {
        if (KeyTraits::isDeletedValue(key))
            return false;

        if (HashFunctions::safeToCompareToEmptyOrDeleted) {
            if (key == KeyTraits::emptyValue())
                return false;
        } else {
            if (isHashTraitsEmptyValue&lt;KeyTraits&gt;(key))
                return false;
        }

        return true;
    }</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>834479</commentid>
    <comment_count>12</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2013-02-15 16:30:12 -0800</bug_when>
    <thetext>Something like that is OK if it would actually make this function work for more key types. I’m not sure it would, though. It’s hard to think these things through in the abstract.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>834514</commentid>
    <comment_count>13</comment_count>
    <who name="Anders Carlsson">andersca</who>
    <bug_when>2013-02-15 17:02:39 -0800</bug_when>
    <thetext>Committed r143071: &lt;http://trac.webkit.org/changeset/143071&gt;</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>188655</attachid>
            <date>2013-02-15 15:45:08 -0800</date>
            <delta_ts>2013-02-15 16:27:36 -0800</delta_ts>
            <desc>Patch</desc>
            <filename>bug-109977-20130215154134.patch</filename>
            <type>text/plain</type>
            <size>5583</size>
            <attacher name="Anders Carlsson">andersca</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMTQzMDUyCmRpZmYgLS1naXQgYS9Tb3VyY2UvV1RGL0NoYW5n
ZUxvZyBiL1NvdXJjZS9XVEYvQ2hhbmdlTG9nCmluZGV4IDQ2MTllOTdjYzYxMzVkNGRiOTRiOTQw
OTRhZWMyYWE2OTIyOTQ0MmIuLmNmMmVmODI2MjQ2MDkzYmM0N2M3YTNjNzcxNTE5YzhjMDI1ZGFh
OTIgMTAwNjQ0Ci0tLSBhL1NvdXJjZS9XVEYvQ2hhbmdlTG9nCisrKyBiL1NvdXJjZS9XVEYvQ2hh
bmdlTG9nCkBAIC0xLDMgKzEsMjIgQEAKKzIwMTMtMDItMTUgIEFuZGVycyBDYXJs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SUQpOwogfQogCiB2b2lkIFdlYlByb2Nlc3NQcm94eTo6ZnJh
bWVDcmVhdGVkKHVpbnQ2NF90IGZyYW1lSUQsIFdlYkZyYW1lUHJveHkqIGZyYW1lUHJveHkpCkBA
IC00NzcsNyArNDc0LDcgQEAgdm9pZCBXZWJQcm9jZXNzUHJveHk6OmRpZERlc3Ryb3lGcmFtZSh1
aW50NjRfdCBmcmFtZUlEKQogICAgIC8vIElmIHRoZSBwYWdlIGlzIGNsb3NlZCBiZWZvcmUgaXQg
aGFzIGhhZCB0aGUgY2hhbmNlIHRvIHNlbmQgdGhlIERpZENyZWF0ZU1haW5GcmFtZSBtZXNzYWdl
CiAgICAgLy8gYmFjayB0byB0aGUgVUlQcm9jZXNzLCB0aGVuIHRoZSBmcmFtZURlc3Ryb3llZCBt
ZXNzYWdlIHdpbGwgc3RpbGwgYmUgcmVjZWl2ZWQgYmVjYXVzZSBpdAogICAgIC8vIGdldHMgc2Vu
dCBkaXJlY3RseSB0byB0aGUgV2ViUHJvY2Vzc1Byb3h5LgotICAgIEFTU0VSVChpc0dvb2RLZXk8
V2ViRnJhbWVQcm94eU1hcD4oZnJhbWVJRCkpOworICAgIEFTU0VSVChtX2ZyYW1lTWFwLmlzR29v
ZEtleShmcmFtZUlEKSk7CiAgICAgbV9mcmFtZU1hcC5yZW1vdmUoZnJhbWVJRCk7CiB9CiAK
</data>
<flag name="review"
          id="208838"
          type_id="1"
          status="+"
          setter="sam"
    />
          </attachment>
      

    </bug>

</bugzilla>