<?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>78438</bug_id>
          
          <creation_ts>2012-02-12 14:18:05 -0800</creation_ts>
          <short_desc>Failed strict assignment to __proto__ not throwing</short_desc>
          <delta_ts>2012-02-20 13:54:45 -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>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>78409</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>0</everconfirmed>
          <reporter name="Mark S. Miller">erights</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>barraclough</cc>
    
    <cc>erights</cc>
    
    <cc>oliver</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>554855</commentid>
    <comment_count>0</comment_count>
    <who name="Mark S. Miller">erights</who>
    <bug_when>2012-02-12 14:18:05 -0800</bug_when>
    <thetext>In Version 5.1.2 (7534.52.7, r107511):

    &gt; var x = Object.preventExtensions({});
    &gt; var y = {};
    &gt; function foo(){&quot;use strict&quot;; x.__proto__ = y;}
    &gt; Object.getPrototypeOf(x) === Object.prototype
    true
    &gt; foo()
    &gt; Object.getPrototypeOf(x) === Object.prototype
    true

The above behavior correctly does not mutate x.__proto__, however, since it is a failed assignment and foo() is strict, the call to foo() should have thrown an exception. Instead it failed silently.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>554856</commentid>
    <comment_count>1</comment_count>
    <who name="Mark S. Miller">erights</who>
    <bug_when>2012-02-12 14:20:02 -0800</bug_when>
    <thetext>See https://bugs.webkit.org/show_bug.cgi?id=65832</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>554859</commentid>
    <comment_count>2</comment_count>
    <who name="Mark S. Miller">erights</who>
    <bug_when>2012-02-12 14:24:31 -0800</bug_when>
    <thetext>On Version 5.1.2 (7534.52.7) I get

    &gt; foo()
    TypeError: Attempted to assign to readonly property.

which is correct, so this is a regression.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>554944</commentid>
    <comment_count>3</comment_count>
    <who name="Gavin Barraclough">barraclough</who>
    <bug_when>2012-02-12 19:02:59 -0800</bug_when>
    <thetext>Ah agreed, we should be following step 3 of your proposal here ( http://wiki.ecmascript.org/doku.php?id=strawman:magic_proto_property ), this will still be a change from our previous behavior, but will be more restrictive rather than less.

Thanks for the bug Mark!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>560344</commentid>
    <comment_count>4</comment_count>
    <who name="Gavin Barraclough">barraclough</who>
    <bug_when>2012-02-20 13:54:45 -0800</bug_when>
    <thetext>I had to roll out bug#78409 to fix a couple of test cases, when I re-landed it I fixed this too.

There is a test case covering this.  All should hopefully be good now, cheers for the bug report.

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

    </bug>

</bugzilla>