Bug 151160

Summary: Class's __proto__ should not be writable
Product: WebKit Reporter: Ryosuke Niwa <rniwa>
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned>
Status: RESOLVED INVALID    
Severity: Normal CC: keith_miller, saam, ysuzuki
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 140491    

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