Bug 151160 - Class's __proto__ should not be writable
Summary: Class's __proto__ should not be writable
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 140491
  Show dependency treegraph
 
Reported: 2015-11-11 15:18 PST by Ryosuke Niwa
Modified: 2015-12-16 14:21 PST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ryosuke Niwa 2015-11-11 15:18:50 PST
Fix the FIXME in ClassExprNode::emitBytecode:
// FIXME: Make the prototype non-configurable & non-writable.
Comment 1 Ryosuke Niwa 2015-11-11 15:19:50 PST
class A {}
class B extends A {
    constructor() {
        super();
    }
}
new B;
class C {
    constructor() {
        alert('FAIL')
    }
}
B.__proto__ = C;
new B;

should never alert FAIL.
Comment 2 Keith Miller 2015-12-16 14:21:08 PST
This is not valid anymore in the spec so... closing
Comment 3 Keith Miller 2015-12-16 14:21:32 PST
err... valid => true