<?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>133903</bug_id>
          
          <creation_ts>2014-06-14 09:35:56 -0700</creation_ts>
          <short_desc>Convert ASSERT in inlineFunctionForCapabilityLevel to early return</short_desc>
          <delta_ts>2014-06-16 13:46:32 -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>JavaScriptCore</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="Michael Saboff">msaboff</reporter>
          <assigned_to name="Michael Saboff">msaboff</assigned_to>
          
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1015661</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Saboff">msaboff</who>
    <bug_when>2014-06-14 09:35:56 -0700</bug_when>
    <thetext>inlineFunctionForCapabilityLevel() begins with:
    if (isClosureCall) {
        ASSERT(kind == CodeForCall);
        return inlineFunctionForClosureCallCapabilityLevel(codeBlock);
    }

In some cases inlineFunctionForCapabilityLevel  is called with isClosureCall true for CodeForConstruct.  In release builds we&apos;ll do the wrong thing.  Instead we should return CannotCompile.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1015663</commentid>
    <comment_count>1</comment_count>
      <attachid>233109</attachid>
    <who name="Michael Saboff">msaboff</who>
    <bug_when>2014-06-14 09:49:41 -0700</bug_when>
    <thetext>Created attachment 233109
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1015878</commentid>
    <comment_count>2</comment_count>
      <attachid>233109</attachid>
    <who name="Mark Hahnenberg">mhahnenberg</who>
    <bug_when>2014-06-16 09:37:37 -0700</bug_when>
    <thetext>Comment on attachment 233109
Patch

r=me</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1015879</commentid>
    <comment_count>3</comment_count>
    <who name="Michael Saboff">msaboff</who>
    <bug_when>2014-06-16 09:41:29 -0700</bug_when>
    <thetext>Committed r170011: &lt;http://trac.webkit.org/changeset/170011&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1015907</commentid>
    <comment_count>4</comment_count>
      <attachid>233109</attachid>
    <who name="Geoffrey Garen">ggaren</who>
    <bug_when>2014-06-16 11:54:36 -0700</bug_when>
    <thetext>Comment on attachment 233109
Patch

Seems like this should be pretty easy to test in a debug build. Can you add a test case?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1015949</commentid>
    <comment_count>5</comment_count>
    <who name="Michael Saboff">msaboff</who>
    <bug_when>2014-06-16 13:46:32 -0700</bug_when>
    <thetext>(In reply to comment #4)
&gt; (From update of attachment 233109 [details])
&gt; Seems like this should be pretty easy to test in a debug build. Can you add a test case?

I don&apos;t know about easy.  In testing on a debug build, I hit this very infrequently, say ~20 minutes.  I will look into writing a test that can reliably hit this case.  Tracked in &lt;https://bugs.webkit.org/show_bug.cgi?id=133950&gt; - &quot;Add test for case where  inlineFunctionForCapabilityLevel() is called for a constructor and isClosureCall is true&quot;</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>233109</attachid>
            <date>2014-06-14 09:49:41 -0700</date>
            <delta_ts>2014-06-16 11:54:36 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>133903.patch</filename>
            <type>text/plain</type>
            <size>1476</size>
            <attacher name="Michael Saboff">msaboff</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9KYXZhU2NyaXB0Q29yZS9DaGFuZ2VMb2cKPT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gU291
cmNlL0phdmFTY3JpcHRDb3JlL0NoYW5nZUxvZwkocmV2aXNpb24gMTY5OTcwKQorKysgU291cmNl
L0phdmFTY3JpcHRDb3JlL0NoYW5nZUxvZwkod29ya2luZyBjb3B5KQpAQCAtMSwzICsxLDE1IEBA
CisyMDE0LTA2LTE0ICBNaWNoYWVsIFNhYm9mZiAgPG1zYWJvZmZAYXBwbGUuY29tPgorCisgICAg
ICAgIENvbnZlcnQgQVNTRVJUIGluIGlubGluZUZ1bmN0aW9uRm9yQ2FwYWJpbGl0eUxldmVsIHRv
IGVhcmx5IHJldHVybgorICAgICAgICBodHRwczovL2J1Z3Mud2Via2l0Lm9yZy9zaG93X2J1Zy5j
Z2k/aWQ9MTMzOTAzCisKKyAgICAgICAgUmV2aWV3ZWQgYnkgTk9CT0RZIChPT1BTISkuCisKKyAg
ICAgICAgSGFyZGVuZWQgY29kZSBieSBDb252ZXJ0aW5nIEFTU0VSVCB0byByZXR1cm4gQ2Fubm90
Q29tcGlsZS4KKworICAgICAgICAqIGRmZy9ERkdDYXBhYmlsaXRpZXMuaDoKKyAgICAgICAgKEpT
Qzo6REZHOjppbmxpbmVGdW5jdGlvbkZvckNhcGFiaWxpdHlMZXZlbCk6CisKIDIwMTQtMDYtMTMg
IE1hcmsgSGFobmVuYmVyZyAgPG1oYWhuZW5iZXJnQGFwcGxlLmNvbT4KIAogICAgICAgICBPU1Ig
ZXhpdCBzaG91bGQgYmFycmllciB0aGUgRXhlY3V0YWJsZXMgZm9yIGFsbCBJbmxpbmVDYWxsRnJh
bWVzLCBub3QganVzdCB0aG9zZSBvbiB0aGUgc3RhY2sgYXQgdGhlIHRpbWUgb2YgZXhpdApJbmRl
eDogU291cmNlL0phdmFTY3JpcHRDb3JlL2RmZy9ERkdDYXBhYmlsaXRpZXMuaAo9PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
Ci0tLSBTb3VyY2UvSmF2YVNjcmlwdENvcmUvZGZnL0RGR0NhcGFiaWxpdGllcy5oCShyZXZpc2lv
biAxNjk5NzApCisrKyBTb3VyY2UvSmF2YVNjcmlwdENvcmUvZGZnL0RGR0NhcGFiaWxpdGllcy5o
CSh3b3JraW5nIGNvcHkpCkBAIC0xNDksNyArMTQ5LDggQEAgaW5saW5lIGJvb2wgbWlnaHRJbmxp
bmVGdW5jdGlvbihDb2RlQmxvYwogaW5saW5lIENhcGFiaWxpdHlMZXZlbCBpbmxpbmVGdW5jdGlv
bkZvckNhcGFiaWxpdHlMZXZlbChDb2RlQmxvY2sqIGNvZGVCbG9jaywgQ29kZVNwZWNpYWxpemF0
aW9uS2luZCBraW5kLCBib29sIGlzQ2xvc3VyZUNhbGwpCiB7CiAgICAgaWYgKGlzQ2xvc3VyZUNh
bGwpIHsKLSAgICAgICAgQVNTRVJUKGtpbmQgPT0gQ29kZUZvckNhbGwpOworICAgICAgICBpZiAo
a2luZCAhPSBDb2RlRm9yQ2FsbCkKKyAgICAgICAgICAgIHJldHVybiBDYW5ub3RDb21waWxlOwog
ICAgICAgICByZXR1cm4gaW5saW5lRnVuY3Rpb25Gb3JDbG9zdXJlQ2FsbENhcGFiaWxpdHlMZXZl
bChjb2RlQmxvY2spOwogICAgIH0KICAgICBpZiAoa2luZCA9PSBDb2RlRm9yQ2FsbCkK
</data>
<flag name="review"
          id="257608"
          type_id="1"
          status="+"
          setter="mhahnenberg"
    />
          </attachment>
      

    </bug>

</bugzilla>