<?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>24268</bug_id>
          
          <creation_ts>2009-02-28 23:54:10 -0800</creation_ts>
          <short_desc>RuntimeArray is not a fully implemented JSArray</short_desc>
          <delta_ts>2009-03-08 03:47:52 -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 JavaScript</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.5</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="sofro">sofromv</reporter>
          <assigned_to name="Oliver Hunt">oliver</assigned_to>
          <cc>oliver</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>111673</commentid>
    <comment_count>0</comment_count>
    <who name="sofro">sofromv</who>
    <bug_when>2009-02-28 23:54:10 -0800</bug_when>
    <thetext>RuntimeArray class from WebCore/bridge has the class info parent JSArray::info. Therefore, it will be treated like a JSArray in function arrayProtoFuncConcat from JavaScriptCore::ArrayPrototype class. When an object of type RuntimeArray will be cast to JSArray, the cast will succeed, but the function arrayProtoFuncConcat will crash when attempting to call length method, that is implemented in JSArray but not in RuntimeArray.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>111674</commentid>
    <comment_count>1</comment_count>
    <who name="Oliver Hunt">oliver</who>
    <bug_when>2009-03-01 00:01:43 -0800</bug_when>
    <thetext>The issue is relatively trivial to fix -- we shouldn&apos;t be blindly casting to a JSArray just because an object descends from Array in JS.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>111678</commentid>
    <comment_count>2</comment_count>
      <attachid>28136</attachid>
    <who name="Oliver Hunt">oliver</who>
    <bug_when>2009-03-01 01:05:22 -0800</bug_when>
    <thetext>Created attachment 28136
Fixeration

This fixes the error</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>111690</commentid>
    <comment_count>3</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2009-03-01 05:48:48 -0800</bug_when>
    <thetext>&gt; arrayProtoFuncConcat will crash when attempting to call length method, that is

Can a test case be written for this?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>111691</commentid>
    <comment_count>4</comment_count>
    <who name="Oliver Hunt">oliver</who>
    <bug_when>2009-03-01 05:53:32 -0800</bug_when>
    <thetext>I&apos;m unsure how to get a runtime array to be created... conceivably i could get drt to instantiate a fabricated class that just claimed to be a JSArray.  Will look into it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>111717</commentid>
    <comment_count>5</comment_count>
      <attachid>28136</attachid>
    <who name="Darin Adler">darin</who>
    <bug_when>2009-03-01 10:52:26 -0800</bug_when>
    <thetext>Comment on attachment 28136
Fixeration

I&apos;m not going to say review+ because I think this needs a regression test.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>112774</commentid>
    <comment_count>6</comment_count>
    <who name="Oliver Hunt">oliver</who>
    <bug_when>2009-03-08 03:27:09 -0700</bug_when>
    <thetext>Making a testcase for this appears infeasible -- i&apos;ve tried for  afew hours just to make a java applet that is capable of scripting to no avail.  I am honestly not surprised applets died given my experience with them.  DRT is also unable to fudge an appropriate JS object as it doesn&apos;t have access to the required SPI.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>112775</commentid>
    <comment_count>7</comment_count>
      <attachid>28136</attachid>
    <who name="Cameron Zwarich (cpst)">zwarich</who>
    <bug_when>2009-03-08 03:32:48 -0700</bug_when>
    <thetext>Comment on attachment 28136
Fixeration

r=me, although you should explain that you can&apos;t make a test in your ChangeLog.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>112776</commentid>
    <comment_count>8</comment_count>
    <who name="Oliver Hunt">oliver</who>
    <bug_when>2009-03-08 03:47:46 -0700</bug_when>
    <thetext>Committing to http://svn.webkit.org/repository/webkit/trunk ...
	M	JavaScriptCore/ChangeLog
	M	JavaScriptCore/runtime/ArrayPrototype.cpp
Committed r41518
</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>28136</attachid>
            <date>2009-03-01 01:05:22 -0800</date>
            <delta_ts>2009-03-08 03:32:48 -0700</delta_ts>
            <desc>Fixeration</desc>
            <filename>concat-fix.patch</filename>
            <type>text/plain</type>
            <size>1474</size>
            <attacher name="Oliver Hunt">oliver</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL0phdmFTY3JpcHRDb3JlL0NoYW5nZUxvZyBiL0phdmFTY3JpcHRDb3JlL0No
YW5nZUxvZwppbmRleCA0MzZkY2JlLi5lM2E0NWMyIDEwMDY0NAotLS0gYS9KYXZhU2NyaXB0Q29y
ZS9DaGFuZ2VMb2cKKysrIGIvSmF2YVNjcmlwdENvcmUvQ2hhbmdlTG9nCkBAIC0xLDMgKzEsMTYg
QEAKKzIwMDktMDMtMDEgIE9saXZlciBIdW50ICA8b2xpdmVyQGFwcGxlLmNvbT4KKworICAgICAg
ICBSZXZpZXdlZCBieSBOT0JPRFkgKE9PUFMhKS4KKworICAgICAgICBCdWcgMjQyNjg6IFJ1bnRp
bWVBcnJheSBpcyBub3QgYSBmdWxseSBpbXBsZW1lbnRlZCBKU0FycmF5CisgICAgICAgIDxodHRw
czovL2J1Z3Mud2Via2l0Lm9yZy9zaG93X2J1Zy5jZ2k/aWQ9MjQyNjg+CisKKyAgICAgICAgRG9u
J3QgY2FzdCBhI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aCgpOworICAgICAgICAgICAgdW5zaWduZWQgbGVuZ3RoID0gdGhpc09iai0+
Z2V0KGV4ZWMsIGV4ZWMtPnByb3BlcnR5TmFtZXMoKS5sZW5ndGgpLnRvVUludDMyKGV4ZWMpOwog
ICAgICAgICAgICAgZm9yICh1bnNpZ25lZCBrID0gMDsgayA8IGxlbmd0aDsgKytrKSB7CiAgICAg
ICAgICAgICAgICAgaWYgKEpTVmFsdWVQdHIgdiA9IGdldFByb3BlcnR5KGV4ZWMsIGN1ckFycmF5
LCBrKSkKICAgICAgICAgICAgICAgICAgICAgYXJyLT5wdXQoZXhlYywgbiwgdik7Cg==
</data>
<flag name="review"
          id="13742"
          type_id="1"
          status="+"
          setter="zwarich"
    />
          </attachment>
      

    </bug>

</bugzilla>