<?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>143325</bug_id>
          
          <creation_ts>2015-04-01 17:06:53 -0700</creation_ts>
          <short_desc>[Content Extensions] Only add unique universal action locations.</short_desc>
          <delta_ts>2015-04-02 12:48:54 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebCore Misc.</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>
          <dependson>143338</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Alex Christensen">achristensen</reporter>
          <assigned_to name="Alex Christensen">achristensen</assigned_to>
          <cc>commit-queue</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1082145</commentid>
    <comment_count>0</comment_count>
    <who name="Alex Christensen">achristensen</who>
    <bug_when>2015-04-01 17:06:53 -0700</bug_when>
    <thetext>Right now we have waaaay too many actions on the DFA root.  That&apos;s slowing things down a lot.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1082147</commentid>
    <comment_count>1</comment_count>
      <attachid>249954</attachid>
    <who name="Alex Christensen">achristensen</who>
    <bug_when>2015-04-01 17:08:53 -0700</bug_when>
    <thetext>Created attachment 249954
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1082150</commentid>
    <comment_count>2</comment_count>
      <attachid>249954</attachid>
    <who name="Benjamin Poulain">benjamin</who>
    <bug_when>2015-04-01 17:13:59 -0700</bug_when>
    <thetext>Comment on attachment 249954
Patch

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

&gt; Source/WebCore/contentextensions/ContentExtensionCompiler.cpp:151
&gt;  

You could take the opportunity to remove that blank line.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1082154</commentid>
    <comment_count>3</comment_count>
    <who name="Alex Christensen">achristensen</who>
    <bug_when>2015-04-01 17:18:04 -0700</bug_when>
    <thetext>http://trac.webkit.org/changeset/182265</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1082233</commentid>
    <comment_count>4</comment_count>
      <attachid>249954</attachid>
    <who name="Darin Adler">darin</who>
    <bug_when>2015-04-02 09:05:50 -0700</bug_when>
    <thetext>Comment on attachment 249954
Patch

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

&gt; Source/WebCore/contentextensions/ContentExtensionCompiler.cpp:136
&gt; +    HashSet&lt;uint64_t&gt; universalActionLocations;

HashSet won’t work with 0 nor will it work with the maximum value. Do we have a guarantee that actionLocationAndFlags will never have either of those values?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1082245</commentid>
    <comment_count>5</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2015-04-02 09:37:17 -0700</bug_when>
    <thetext>This patch made a test assert: https://webkit-test-results.appspot.com/dashboards/flakiness_dashboard.html#showAllRuns=true&amp;tests=http%2Ftests%2Fcontentextensions%2Fwhitelist.html

ASSERT(!HashTranslator::equal(KeyTraits::emptyValue(), key));

Looks like Darin&apos;s comment is spot on.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1082247</commentid>
    <comment_count>6</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2015-04-02 09:40:06 -0700</bug_when>
    <thetext>Re-opened since this is blocked by bug 143338</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1082311</commentid>
    <comment_count>7</comment_count>
    <who name="Alex Christensen">achristensen</who>
    <bug_when>2015-04-02 12:48:54 -0700</bug_when>
    <thetext>I forgot the HashTraits :(

The value can be 0, so I used UnsignedWithZeroKeyHashTraits.  We only use the lowest 48 bits of the uint64_t, so it will never be the maximum 2 values.

http://trac.webkit.org/changeset/182283</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>249954</attachid>
            <date>2015-04-01 17:08:53 -0700</date>
            <delta_ts>2015-04-01 17:13:14 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-143325-20150401170824.patch</filename>
            <type>text/plain</type>
            <size>1901</size>
            <attacher name="Alex Christensen">achristensen</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9XZWJDb3JlL0NoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBTb3VyY2UvV2Vi
Q29yZS9DaGFuZ2VMb2cJKHJldmlzaW9uIDE4MjI2NCkKKysrIFNvdXJjZS9XZWJDb3JlL0NoYW5n
ZUxvZwkod29ya2luZyBjb3B5KQpAQCAtMSwzICsxLDE0IEBACisyMDE1LTA0LTAxICBBbGV4IENo
cmlzdGVuc2VuICA8YWNocmlzdGVuc2VuQHdlYmtpdC5vcmc+CisKKyAgICAgICAgW0NvbnRlbnQg
RXh0ZW5zaW9uc10gT25seSBhZGQgdW5pcXVlIHVuaXZlcnNhbCBhY3Rpb24gbG9jYXRpb25zLgor
ICAgICAgICBodHRwczovL2J1Z3Mud2Via2l0Lm9yZy9zaG93X2J1Zy5jZ2k/aWQ9MTQzMzI1CisK
KyAgICAgICAgUmV2aWV3ZWQgYnkgTk9CT0RZIChPT1BTISkuCisKKyAgICAgICAgKiBjb250ZW50
ZXh0ZW5zaW9ucy9Db250ZW50RXh0ZW5zaW9uQ29tcGlsZXIuY3B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
c2hTZXQ8dWludDY0X3Q+IHVuaXZlcnNhbEFjdGlvbkxvY2F0aW9uczsKIAogICAgIENvbWJpbmVk
VVJMRmlsdGVycyBjb21iaW5lZFVSTEZpbHRlcnM7CiAgICAgVVJMRmlsdGVyUGFyc2VyIHVybEZp
bHRlclBhcnNlcihjb21iaW5lZFVSTEZpbHRlcnMpOwpAQCAtMTUxLDcgKzE1MSw3IEBAIHN0ZDo6
ZXJyb3JfY29kZSBjb21waWxlUnVsZUxpc3QoQ29udGVudEUKIAogICAgICAgICAgICAgaWYgKGln
bm9yZVByZXZpb3VzUnVsZXNTZWVuKQogICAgICAgICAgICAgICAgIHJldHVybiBDb250ZW50RXh0
ZW5zaW9uRXJyb3I6OlJlZ2V4TWF0Y2hlc0V2ZXJ5dGhpbmdBZnRlcklnbm9yZVByZXZpb3VzUnVs
ZXM7Ci0gICAgICAgICAgICB1bml2ZXJzYWxBY3Rpb25Mb2NhdGlvbnMuYXBwZW5kKGFjdGlvbkxv
Y2F0aW9uQW5kRmxhZ3MpOworICAgICAgICAgICAgdW5pdmVyc2FsQWN0aW9uTG9jYXRpb25zLmFk
ZChhY3Rpb25Mb2NhdGlvbkFuZEZsYWdzKTsKICAgICAgICAgfQogCiAgICAgICAgIGlmIChzdGF0
dXMgIT0gVVJMRmlsdGVyUGFyc2VyOjpPayAmJiBzdGF0dXMgIT0gVVJMRmlsdGVyUGFyc2VyOjpN
YXRjaGVzRXZlcnl0aGluZykgewo=
</data>
<flag name="review"
          id="274794"
          type_id="1"
          status="+"
          setter="benjamin"
    />
          </attachment>
      

    </bug>

</bugzilla>