« Bugzilla Issues Index
#1613 — 8.3.16.10: step 7 can fail silently if non-configurable "prototype" already present
- bug_id:
1613
- creation_ts:
2013-07-30 10:15:00 -0700
- short_desc:
8.3.16.10: step 7 can fail silently if non-configurable "prototype" already present
- delta_ts:
2013-08-23 08:21:56 -0700
- product:
Draft for 6th Edition
- component:
technical issue
- version:
Rev 16: July 15, 2013 Draft
- rep_platform:
All
- op_sys:
All
- bug_status:
RESOLVED
- resolution:
FIXED
- priority:
Normal
- bug_severity:
normal
- everconfirmed:
true
- reporter:
André Bargull
- assigned_to:
Allen Wirfs-Brock
- commentid:
4586
- comment_count:
0
- who:
André Bargull
- bug_when:
2013-07-30 10:15:17 -0700
Step 7 of 8.3.16.10 (MakeConstructor) can fail silently if the `F` object already has a non-configurable "prototype" property. Maybe this is also place where DefinePropertyOrThrow() needs to be used, but I'm not 100% this time.
test case:
---
class MyFunction extends Function {
constructor(...args) {
Object.defineProperty(this, "prototype", {value: 0});
super(...args);
}
}
var fn = new MyFunction("");
print(fn.prototype); // prints 0
---
- commentid:
4993
- comment_count:
1
- who:
Allen Wirfs-Brock
- bug_when:
2013-08-21 13:34:49 -0700
this should never occur. Added an appropriate assertion.
Fixed in rev17 editor's draft
- commentid:
5016
- comment_count:
2
- who:
Allen Wirfs-Brock
- bug_when:
2013-08-23 08:21:56 -0700
fixed in rev17, August 23, 2013 draft