Bug 151160
| Summary: | Class's __proto__ should not be writable | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Ryosuke Niwa <rniwa> |
| Component: | JavaScriptCore | Assignee: | 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 | ||
Ryosuke Niwa
Fix the FIXME in ClassExprNode::emitBytecode:
// FIXME: Make the prototype non-configurable & non-writable.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Ryosuke Niwa
class A {}
class B extends A {
constructor() {
super();
}
}
new B;
class C {
constructor() {
alert('FAIL')
}
}
B.__proto__ = C;
new B;
should never alert FAIL.
Keith Miller
This is not valid anymore in the spec so... closing
Keith Miller
err... valid => true