<?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>155012</bug_id>
          
          <creation_ts>2016-03-04 00:46:24 -0800</creation_ts>
          <short_desc>[[Set]] isn&apos;t correct with respect to the spec and Proxy</short_desc>
          <delta_ts>2019-11-04 15:30:16 -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 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>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Saam Barati">saam</reporter>
          <assigned_to name="Saam Barati">saam</assigned_to>
          <cc>ashvayka</cc>
    
    <cc>commit-queue</cc>
    
    <cc>ews-watchlist</cc>
    
    <cc>keith_miller</cc>
    
    <cc>mark.lam</cc>
    
    <cc>msaboff</cc>
    
    <cc>ross.kirsling</cc>
    
    <cc>tzagallo</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1170552</commentid>
    <comment_count>0</comment_count>
    <who name="Saam Barati">saam</who>
    <bug_when>2016-03-04 00:46:24 -0800</bug_when>
    <thetext>When we traverse the prototype chain during [[Set]], we need to perform the following if O is a proxy
because this is observable behavior.
```
if (O is a proxy) {
    let result = O.[[GetOwnPropertyDescriptor]](...)
    if (result) return;
    let proto = O.[[GetPrototypeOf]]()
...
}
```
Right now, we just perform the [[Set]] unconditionally.
We can special case Proxy here because this behavior is only observable with a Proxy.
If the thing isn&apos;t a Proxy, we can do the fast prototype() lookup, etc.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1587118</commentid>
    <comment_count>1</comment_count>
      <attachid>382766</attachid>
    <who name="Alexey Shvayka">ashvayka</who>
    <bug_when>2019-11-04 13:22:17 -0800</bug_when>
    <thetext>Created attachment 382766
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1587158</commentid>
    <comment_count>2</comment_count>
      <attachid>382766</attachid>
    <who name="Saam Barati">saam</who>
    <bug_when>2019-11-04 14:28:44 -0800</bug_when>
    <thetext>Comment on attachment 382766
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=382766&amp;action=review

&gt; Source/JavaScriptCore/runtime/JSObject.cpp:-843
&gt; -            // https://bugs.webkit.org/show_bug.cgi?id=155012

can you close this bug?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1587161</commentid>
    <comment_count>3</comment_count>
    <who name="Alexey Shvayka">ashvayka</who>
    <bug_when>2019-11-04 14:33:54 -0800</bug_when>
    <thetext>(In reply to Saam Barati from comment #2)
&gt; Comment on attachment 382766 [details]
&gt; Patch
&gt; 
&gt; View in context:
&gt; https://bugs.webkit.org/attachment.cgi?id=382766&amp;action=review
&gt; 
&gt; &gt; Source/JavaScriptCore/runtime/JSObject.cpp:-843
&gt; &gt; -            // https://bugs.webkit.org/show_bug.cgi?id=155012
&gt; 
&gt; can you close this bug?

It is this very bug, so the commit bot will close it (I don&apos;t have such rights yet).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1587165</commentid>
    <comment_count>4</comment_count>
    <who name="Saam Barati">saam</who>
    <bug_when>2019-11-04 14:37:37 -0800</bug_when>
    <thetext>(In reply to Alexey Shvayka from comment #3)
&gt; (In reply to Saam Barati from comment #2)
&gt; &gt; Comment on attachment 382766 [details]
&gt; &gt; Patch
&gt; &gt; 
&gt; &gt; View in context:
&gt; &gt; https://bugs.webkit.org/attachment.cgi?id=382766&amp;action=review
&gt; &gt; 
&gt; &gt; &gt; Source/JavaScriptCore/runtime/JSObject.cpp:-843
&gt; &gt; &gt; -            // https://bugs.webkit.org/show_bug.cgi?id=155012
&gt; &gt; 
&gt; &gt; can you close this bug?
&gt; 
&gt; It is this very bug, so the commit bot will close it (I don&apos;t have such
&gt; rights yet).

haha. Oops. I didn&apos;t realize it was the same one :-)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1587194</commentid>
    <comment_count>5</comment_count>
      <attachid>382766</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2019-11-04 15:29:17 -0800</bug_when>
    <thetext>Comment on attachment 382766
Patch

Clearing flags on attachment: 382766

Committed r252019: &lt;https://trac.webkit.org/changeset/252019&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1587195</commentid>
    <comment_count>6</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2019-11-04 15:29:19 -0800</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1587196</commentid>
    <comment_count>7</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2019-11-04 15:30:16 -0800</bug_when>
    <thetext>&lt;rdar://problem/56883293&gt;</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>382766</attachid>
            <date>2019-11-04 13:22:17 -0800</date>
            <delta_ts>2019-11-04 15:29:17 -0800</delta_ts>
            <desc>Patch</desc>
            <filename>bug-155012-20191104232216.patch</filename>
            <type>text/plain</type>
            <size>2033</size>
            <attacher name="Alexey Shvayka">ashvayka</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9KYXZhU2NyaXB0Q29yZS9DaGFuZ2VMb2cKPT09PT09PT09PT09PT09PT09
PT09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tbU2V0XV0gaGVy
ZS4KLSAgICAgICAgICAgIC8vIFdlIG5lZWQgdG8gZG8gbW9yZSBiZWNhdXNlIHRoaXMgaXMgb2Jz
ZXJ2YWJsZSBiZWhhdmlvci4KLSAgICAgICAgICAgIC8vIGh0dHBzOi8vYnVncy53ZWJraXQub3Jn
L3Nob3dfYnVnLmNnaT9pZD0xNTUwMTIKICAgICAgICAgICAgIFByb3h5T2JqZWN0KiBwcm94eSA9
IGpzQ2FzdDxQcm94eU9iamVjdCo+KG9iaik7CiAgICAgICAgICAgICBSRUxFQVNFX0FORF9SRVRV
Uk4oc2NvcGUsIHByb3h5LT5Qcm94eU9iamVjdDo6cHV0KHByb3h5LCBnbG9iYWxPYmplY3QsIHBy
b3BlcnR5TmFtZSwgdmFsdWUsIHNsb3QpKTsKICAgICAgICAgfQo=
</data>

          </attachment>
      

    </bug>

</bugzilla>