<?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>220842</bug_id>
          
          <creation_ts>2021-01-21 23:20:45 -0800</creation_ts>
          <short_desc>A question about global variables</short_desc>
          <delta_ts>2021-02-02 10:45:22 -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>203456</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</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="Alexey Shvayka">ashvayka</assigned_to>
          <cc>ashvayka</cc>
    
    <cc>fpizlo</cc>
    
    <cc>keith_miller</cc>
    
    <cc>mark.lam</cc>
    
    <cc>nwu_ty</cc>
    
    <cc>smoley</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>ysuzuki</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1721495</commentid>
    <comment_count>0</comment_count>
    <who name="NWU_NISL">nisl_grammarly1</who>
    <bug_when>2021-01-21 23:20:45 -0800</bug_when>
    <thetext>#version: dbae081(https://github.com/WebKit/WebKit-http/commit/dbae081ad7e22d9ab61edf2f337f6c2bb593c7f8)

#Testcase:
var x = 4;
Object.defineProperty(this, &apos;x&apos;, {
    writable: false
});
x = 3;
print(x);
print(this.x);

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

#Output:
3
4

#Expected output:
4
4

#Description:
When executing this test case, since x is not writable (in line 3), other engines (such as v8, SpiderMonkey, chakra, etc.) did not change the value of x, but JavascriptCore successfully changed the value of x to 3. Maybe this is a bug of JavascriptCore.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1723214</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2021-01-27 16:54:51 -0800</bug_when>
    <thetext>&lt;rdar://problem/73686367&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1724168</commentid>
    <comment_count>2</comment_count>
    <who name="Yusuke Suzuki">ysuzuki</who>
    <bug_when>2021-02-01 02:42:51 -0800</bug_when>
    <thetext>@Alexey maybe this is the same to https://bugs.webkit.org/show_bug.cgi?id=203456 ?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1724661</commentid>
    <comment_count>3</comment_count>
    <who name="Alexey Shvayka">ashvayka</who>
    <bug_when>2021-02-02 07:39:27 -0800</bug_when>
    <thetext>(In reply to Yusuke Suzuki from comment #2)
&gt; @Alexey maybe this is the same to
&gt; https://bugs.webkit.org/show_bug.cgi?id=203456 ?

Yeah, that&apos;s right, thanks.
I wish we could remove JSGlobalObject::defineOwnProperty() though...

*** This bug has been marked as a duplicate of bug 203456 ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1724760</commentid>
    <comment_count>4</comment_count>
    <who name="Yusuke Suzuki">ysuzuki</who>
    <bug_when>2021-02-02 10:45:22 -0800</bug_when>
    <thetext>(In reply to Alexey Shvayka from comment #3)
&gt; (In reply to Yusuke Suzuki from comment #2)
&gt; &gt; @Alexey maybe this is the same to
&gt; &gt; https://bugs.webkit.org/show_bug.cgi?id=203456 ?
&gt; 
&gt; Yeah, that&apos;s right, thanks.
&gt; I wish we could remove JSGlobalObject::defineOwnProperty() though...

Yeah :)

&gt; 
&gt; *** This bug has been marked as a duplicate of bug 203456 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>