<?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>143066</bug_id>
          
          <creation_ts>2015-03-25 16:46:17 -0700</creation_ts>
          <short_desc>Poor runtime error message dealing with undefined in strict mode compared to non-strict mode</short_desc>
          <delta_ts>2017-01-18 23:39:11 -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>ASSIGNED</bug_status>
          <resolution></resolution>
          
          
          <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="Joseph Pecoraro">joepeck</reporter>
          <assigned_to name="Saam Barati">saam</assigned_to>
          <cc>ggaren</cc>
    
    <cc>joepeck</cc>
    
    <cc>rniwa</cc>
    
    <cc>saam</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1080100</commentid>
    <comment_count>0</comment_count>
    <who name="Joseph Pecoraro">joepeck</who>
    <bug_when>2015-03-25 16:46:17 -0700</bug_when>
    <thetext>* SUMMARY
Very poor runtime error message dealing with undefined in strict mode compared to non-strict mode.

* TEST
&lt;script&gt;
&quot;use strict&quot;;
function Foo() {
    this._key = undefined;
    this._key.name = &quot;test&quot;;
}
new Foo;
&lt;/script&gt;

* NON-STRICT (expected)
[Error] TypeError: undefined is not an object (evaluating &apos;this._key.name = &quot;test&quot;&apos;)

* STRICT (actual)
[Error] TypeError: Attempted to assign to readonly property.

* NOTES
- Because Classes imply strict mode and we&apos;ve started making heavy use of classes, this will greatly impact us when working on WebInspector.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1080123</commentid>
    <comment_count>1</comment_count>
    <who name="Timothy Hatcher">timothy</who>
    <bug_when>2015-03-25 17:30:07 -0700</bug_when>
    <thetext>This stumped me for a while today.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1080819</commentid>
    <comment_count>2</comment_count>
    <who name="Saam Barati">saam</who>
    <bug_when>2015-03-27 17:32:31 -0700</bug_when>
    <thetext>I&apos;ll take this</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>