<?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>26593</bug_id>
          
          <creation_ts>2009-06-21 16:31:50 -0700</creation_ts>
          <short_desc>Enumeration of prototypes with more than 64 properties cache not invalidated</short_desc>
          <delta_ts>2009-06-25 06:30:56 -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>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc>http://labs.calyptus.eu/WebKitPrototypeCache/</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P1</priority>
          <bug_severity>Major</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Sebastian Markbåge">sebastian</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>jankassens</cc>
    
    <cc>john.david.dalton</cc>
    
    <cc>oliver</cc>
    
    <cc>sam</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>127261</commentid>
    <comment_count>0</comment_count>
    <who name="Sebastian Markbåge">sebastian</who>
    <bug_when>2009-06-21 16:31:50 -0700</bug_when>
    <thetext>If object B inherits from prototype A and prototype A has more than 64 properties, it seems that the enumeration of properties of object B is cached.

However, if more properties are added to the prototype the cache is not invalidated.

So if an additional property is added to the prototype between enumerations, the new property is not enumerated over.

The linked example clearly illustrates this issue.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>127263</commentid>
    <comment_count>1</comment_count>
      <attachid>31625</attachid>
    <who name="Sebastian Markbåge">sebastian</who>
    <bug_when>2009-06-21 17:03:37 -0700</bug_when>
    <thetext>Created attachment 31625
Test case</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>127277</commentid>
    <comment_count>2</comment_count>
    <who name="Sam Weinig">sam</who>
    <bug_when>2009-06-21 21:49:14 -0700</bug_when>
    <thetext>&lt;rdar://problem/6992822&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>127795</commentid>
    <comment_count>3</comment_count>
    <who name="Oliver Hunt">oliver</who>
    <bug_when>2009-06-23 19:48:32 -0700</bug_when>
    <thetext>Committing to http://svn.webkit.org/repository/webkit/trunk ...
	M	JavaScriptCore/ChangeLog
	M	JavaScriptCore/interpreter/Interpreter.cpp
	M	JavaScriptCore/jit/JITStubs.cpp
	M	JavaScriptCore/runtime/Structure.cpp
	M	JavaScriptCore/runtime/StructureChain.cpp
	M	JavaScriptCore/runtime/StructureChain.h
	M	LayoutTests/ChangeLog
	A	LayoutTests/fast/js/dictionary-no-cache.html
	A	LayoutTests/fast/js/resources/dictionary-no-cache.js
Committed r45039

Please verify in the next nightly :D</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>128015</commentid>
    <comment_count>4</comment_count>
    <who name="John-David Dalton">john.david.dalton</who>
    <bug_when>2009-06-24 15:17:47 -0700</bug_when>
    <thetext>In the attachment I noticed that performing something like

test2._x = 1; delete test2._x;

before the for-in loop seems to fix the issue.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>128179</commentid>
    <comment_count>5</comment_count>
    <who name="Jan Kassens">jankassens</who>
    <bug_when>2009-06-25 06:30:56 -0700</bug_when>
    <thetext>Sebastian&apos;s test case works now here (nighly).</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>31625</attachid>
            <date>2009-06-21 17:03:37 -0700</date>
            <delta_ts>2009-06-21 17:03:37 -0700</delta_ts>
            <desc>Test case</desc>
            <filename>testcase.html</filename>
            <type>text/html</type>
            <size>673</size>
            <attacher name="Sebastian Markbåge">sebastian</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWwgUFVCTElDICItLy9XM0MvL0RURCBYSFRNTCAxLjAgU3RyaWN0Ly9FTiIg
Imh0dHA6Ly93d3cudzMub3JnL1RSL3hodG1sMS9EVEQveGh0bWwxLXN0cmljdC5kdGQiPgo8aHRt
bD4KPGhlYWQ+Cjx0aXRsZT5XZWJLaXQgUHJvdG90eXBlIENhY2hlIEJ1ZzwvdGl0bGU+CjwvaGVh
ZD4KCjxib2R5Pgo8c2NyaXB0IHR5cGU9InRleHQvamF2YXNjcmlwdCI+Cgp2YXIgVGVzdCA9IGZ1
bmN0aW9uKCl7fTsKCnZhciBtZXRob2RDb3VudCA9IDY1OwoKZm9yICh2YXIgaSA9IDA7IGkgPCBt
ZXRob2RDb3VudDsgaSsrKXsKCVRlc3QucHJvdG90eXBlWydteU1ldGhvZCcgKyBpXSA9IGZ1bmN0
aW9uKCl7fTsKfQoKdmFyIHRlc3QxID0gbmV3IFRlc3QoKTsKCmZvciAodmFyIGsgaW4gdGVzdDEp
OwoKVGVzdC5wcm90b3R5cGUubXlBZGRpdGlvbmFsTWV0aG9kID0gZnVuY3Rpb24oKXt9OwoKdmFy
IHRlc3QyID0gbmV3IFRlc3QoKTsKCnZhciBmb3VuZCA9IGZhbHNlOwpmb3IgKHZhciBrIGluIHRl
c3QyKXsKCWlmIChrID09ICdteUFkZGl0aW9uYWxNZXRob2QnKSBmb3VuZCA9IHRydWU7Cn0KCmRv
Y3VtZW50LndyaXRlKCdteUFkZGl0aW9uYWxNZXRob2Q6ICcgKyBmb3VuZC50b1N0cmluZygpICsg
IiBleHBlY3RlZCB0cnVlIik7Cgo8L3NjcmlwdD4KPC9ib2R5Pgo8L2h0bWw+Cg==
</data>

          </attachment>
      

    </bug>

</bugzilla>