Closed
Bug 201989
Opened 22 years ago
Closed 22 years ago
prototype property of predefined error object is neither ReadOnly nor DontDelete
Categories
(Rhino Graveyard :: Core, defect)
Rhino Graveyard
Core
Tracking
(Not tracked)
VERIFIED
FIXED
1.5R5
People
(Reporter: igor, Assigned: norrisboyd)
Details
Attachments
(2 files, 1 obsolete file)
699 bytes,
application/x-javascript
|
Details | |
4.36 KB,
patch
|
Details | Diff | Splinter Review |
The EcmaScript standard in 15.11.7.6 states:
15.11.7.6 NativeError.prototype
The initial value of NativeError.prototype is a NativeError prototype object
(15.11.7.7). Each
NativeError constructor has a separate prototype object.
This property has the attributes { DontEnum, DontDelete, ReadOnly }.
In Rhino the prototype property has neither of this attributes as a test case
from the following attchment indicates.
Reporter | ||
Comment 1•22 years ago
|
||
The test case should print nothing, but instead it indicates failure for each
error object. Note: the test case does not check that prototype is DontEnum
Reporter | ||
Comment 2•22 years ago
|
||
Comment 3•22 years ago
|
||
Igor, thank you for these tests! I added one for DontEnum, also.
I split them up and added them to JS testsuite as follows:
mozilla/js/tests/ecma_3/Exceptions/15.11.7.6-001.js <---DontEnum
mozilla/js/tests/ecma_3/Exceptions/15.11.7.6-002.js <---DontDelete
mozilla/js/tests/ecma_3/Exceptions/15.11.7.6-003.js <---ReadOnly
All three are currently passing in SpiderMonkey.
In Rhino, only the first one is passing -
Reporter | ||
Comment 4•22 years ago
|
||
Since the changes to NatveGlobal removed the only usage of
IdFunction.setFunctionType method outside IdFunction, I extended the patch to
remove setFunctionType and corresponding getFunctionType in IdFunction and use
a simple private boolean field there to mark functions that can be called as
constructors.
Attachment #120461 -
Attachment is obsolete: true
Reporter | ||
Comment 5•22 years ago
|
||
I committed the above fix.
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Comment 6•22 years ago
|
||
Verified FIXED.
The above testcases now pass in the Rhino shell in compiled and interpreted mode.
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•