[Webkit-unassigned] [Bug 143066] New: Very poor runtime error message dealing with undefined in strict mode compared to non-strict mode

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Mar 25 16:46:17 PDT 2015


https://bugs.webkit.org/show_bug.cgi?id=143066

            Bug ID: 143066
           Summary: Very poor runtime error message dealing with undefined
                    in strict mode compared to non-strict mode
    Classification: Unclassified
           Product: WebKit
           Version: 528+ (Nightly build)
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: joepeck at webkit.org
                CC: ggaren at apple.com, rniwa at webkit.org,
                    saambarati1 at gmail.com, timothy at apple.com

* SUMMARY
Very poor runtime error message dealing with undefined in strict mode compared to non-strict mode.

* TEST
<script>
"use strict";
function Foo() {
    this._key = undefined;
    this._key.name = "test";
}
new Foo;
</script>

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

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

* NOTES
- Because Classes imply strict mode and we've started making heavy use of classes, this will greatly impact us when working on WebInspector.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20150325/8b82f35f/attachment-0002.html>


More information about the webkit-unassigned mailing list