<?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>141230</bug_id>
          
          <creation_ts>2015-02-03 21:21:13 -0800</creation_ts>
          <short_desc>Regression(r179584): Assertion hit in toResourceLoadPriority() on Yosemite</short_desc>
          <delta_ts>2015-02-03 22:25:12 -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>Page Loading</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>
          
          <blocked>141186</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Chris Dumez">cdumez</reporter>
          <assigned_to name="Chris Dumez">cdumez</assigned_to>
          <cc>ap</cc>
    
    <cc>koivisto</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1066723</commentid>
    <comment_count>0</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2015-02-03 21:21:13 -0800</bug_when>
    <thetext>Regression(r179584): Assertion hit in toResourceLoadPriority() on Yosemite:
SHOULD NEVER BE REACHED
/Volumes/Data/slave/yosemite-debug/build/Source/WebCore/platform/network/cf/ResourceRequestCFNet.h(58) : WebCore::ResourceLoadPriority WebCore::toResourceLoadPriority(int)
1   0x10f2de430 WTFCrash
2   0x1149ae111 WebCore::toResourceLoadPriority(int)
3   0x1149ac9ed WebCore::ResourceRequest::doUpdateResourceRequest()
4   0x1149a97e2 WebCore::ResourceRequestBase::updateResourceRequest(WebCore::HTTPBodyUpdatePolicy) const
5   0x1149aa29e WebCore::ResourceRequestBase::url() const
6   0x11a5306de -[WebFrame loadRequest:]
7   0x10e634fa5 runTest(std::__1::basic_string&lt;char, std::__1::char_traits&lt;char&gt;, std::__1::allocator&lt;char&gt; &gt; const&amp;)
8   0x10e633ada runTestingServerLoop()
9   0x10e63326a dumpRenderTree(int, char const**)
10  0x10e635906 DumpRenderTreeMain(int, char const**)
11  0x10e6855c2 main
12  0x7fff880015c9 start

Not sure what&apos;s happening yet. The CFNetwork doc (CFURLRequestPriority) does not indicate -1 as being a valid resource load priority value.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1066725</commentid>
    <comment_count>1</comment_count>
      <attachid>246014</attachid>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2015-02-03 21:24:52 -0800</bug_when>
    <thetext>Created attachment 246014
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1066727</commentid>
    <comment_count>2</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2015-02-03 21:36:27 -0800</bug_when>
    <thetext>&gt; The CFNetwork doc (CFURLRequestPriority) does not indicate -1 as being a valid resource load priority value.

I recall that we define custom priority levels and don&apos;t use normal CFNetwork ones. Perhaps -1 is one of those?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1066728</commentid>
    <comment_count>3</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2015-02-03 21:39:40 -0800</bug_when>
    <thetext>(In reply to comment #2)
&gt; &gt; The CFNetwork doc (CFURLRequestPriority) does not indicate -1 as being a valid resource load priority value.
&gt; 
&gt; I recall that we define custom priority levels and don&apos;t use normal
&gt; CFNetwork ones. Perhaps -1 is one of those?

Where would those be? We always call toResourceLoadPriority(wkGetHTTPRequestPriority()). I looked at the wkGetHTTPRequestPriority() implementation but couldn&apos;t find anything custom.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1066731</commentid>
    <comment_count>4</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2015-02-03 21:43:26 -0800</bug_when>
    <thetext>Also, when calling wkSetHTTPRequestPriority(), we always use toPlatformRequestPriority() on the priority. I took care in r179584 to remove -1 from that function already so we should never be setting -1 ourselves.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1066732</commentid>
    <comment_count>5</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2015-02-03 21:49:22 -0800</bug_when>
    <thetext>Looking at CFURLRequest.h, CFURLRequestPriority is documented to have values from 0 to 2. However, we call WKSetHTTPRequestMaximumPriority to change that, and use values up to 4.

This indeed doesn&apos;t answer the question of where -1 comes from. Did you check CFNetwork source code?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1066733</commentid>
    <comment_count>6</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2015-02-03 21:51:27 -0800</bug_when>
    <thetext>(In reply to comment #5)
&gt; Looking at CFURLRequest.h, CFURLRequestPriority is documented to have values
&gt; from 0 to 2. However, we call WKSetHTTPRequestMaximumPriority to change
&gt; that, and use values up to 4.
&gt; 
&gt; This indeed doesn&apos;t answer the question of where -1 comes from. Did you
&gt; check CFNetwork source code?

Yes, this is what I am currently doing (so far no explanation though). I still think we should land this patch in the mean time though to make the bots happy. We were handling -1 in this function prior to r179584 already.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1066742</commentid>
    <comment_count>7</comment_count>
      <attachid>246014</attachid>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2015-02-03 22:25:06 -0800</bug_when>
    <thetext>Comment on attachment 246014
Patch

Clearing flags on attachment: 246014

Committed r179593: &lt;http://trac.webkit.org/changeset/179593&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1066743</commentid>
    <comment_count>8</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2015-02-03 22:25:12 -0800</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>246014</attachid>
            <date>2015-02-03 21:24:52 -0800</date>
            <delta_ts>2015-02-03 22:25:06 -0800</delta_ts>
            <desc>Patch</desc>
            <filename>bug-141230-20150203212451.patch</filename>
            <type>text/plain</type>
            <size>1606</size>
            <attacher name="Chris Dumez">cdumez</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMTc5NTg5CmRpZmYgLS1naXQgYS9Tb3VyY2UvV2ViQ29yZS9D
aGFuZ2VMb2cgYi9Tb3VyY2UvV2ViQ29yZS9DaGFuZ2VMb2cKaW5kZXggOWMzZjI2NmNlZDFiZmFi
MDA0ZWUwYzU5MTYzNzkwNjBlNjA1MGRhZi4uNGYzYTBmYzZiYmUwYjk1NjUwYTVmMjFiZmMxMzk3
MmZiMDVkNmE2ZiAxMDA2NDQKLS0tIGEvU291cmNlL1dlYkNvcmUvQ2hhbmdlTG9nCisrKyBiL1Nv
dXJjZS9XZWJDb3JlL0NoYW5nZUxvZwpAQCAtMSw1ICsxLDIwIEBACiAyMDE1LTAyLTAzICBDaHJp
cyBEdW1leiAgPGNkdW1lekBhcHBsZS5jb20+CiAKKyAgICAgICAgUmVncmVzc2lvbihyMTc5NTg0
KTogQXNzZXJ0aW9uIGhpdCBpbiB0b1Jlc291cmNlTG9hZFByaW9yaXR5KCkgb24gWW9zZW1pdGUK
KyAgICAgICAgaHR0cHM6Ly9idWdzLndlYmtpdC5vcmcvc2hvd19idWcuY2dpP2lkPTE0MTIzMAor
CisgICAgICAgIFJldmlld2VkIGJ5IE5PQk9EWSAoT09QUyEpLgorCisgICAgICAgIEhhbmRsZSAt
MSBwcmlvcml0eSB2YWx1ZSBhZ2FpbiBpbiB0b1Jlc291cmNlTG9hZFByaW9yaXR5KCkgYXMgaXQg
c2VlbXMgdG8KKyAgICAgICAgYmUgcmV0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