<?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>221176</bug_id>
          
          <creation_ts>2021-01-30 04:57:08 -0800</creation_ts>
          <short_desc>An issue about redefining attributes</short_desc>
          <delta_ts>2021-01-30 09:23:00 -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>JavaScriptCore</component>
          <version>WebKit Local Build</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>38970</dup_id>
          
          <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="NWU_NISL">nisl_grammarly1</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ashvayka</cc>
    
    <cc>fpizlo</cc>
    
    <cc>ysuzuki</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1724028</commentid>
    <comment_count>0</comment_count>
    <who name="NWU_NISL">nisl_grammarly1</who>
    <bug_when>2021-01-30 04:57:08 -0800</bug_when>
    <thetext>#version: d940b47

#Testcase
var proto = {};
Object.defineProperty(proto, &apos;prop&apos;, {
    enumerable: true,
});
var Con = function() {};
Con.prototype = proto;
var obj = new Con();
Object.defineProperty(obj, &apos;prop&apos;, {
    enumerable: false,
});
var arr = Object.keys(obj);
for (var p in obj) {
    print(1)
}

#Command:
./webkit/WebKitBuild/Release/bin/jsc testcase.js

#Output:
1

#Expected output:


# Description
When executing this test case, the prop property of obj was redefined, and other engines (SpiderMonkey, v8, chakra, etc.) set it as the redefined property, but the property of JavascriptCore is still the property on the prototype. So I suspect this is an implementation error of JavascriptCore.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1724035</commentid>
    <comment_count>1</comment_count>
    <who name="Alexey Shvayka">ashvayka</who>
    <bug_when>2021-01-30 09:23:00 -0800</bug_when>
    <thetext>(In reply to NWU_NISL from comment #0)
&gt; # Description
&gt; When executing this test case, the prop property of obj was redefined, and
&gt; other engines (SpiderMonkey, v8, chakra, etc.) set it as the redefined
&gt; property, but the property of JavascriptCore is still the property on the
&gt; prototype. So I suspect this is an implementation error of JavascriptCore.

Thank you for the test case!
It was a long-standing issue, but as of r270874, JSC doesn&apos;t enumerate &quot;prop&quot; either.

*** This bug has been marked as a duplicate of bug 38970 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>