Closed
Bug 1458628
Opened 8 years ago
Closed 8 years ago
Spidermonkey should throw TypeError if [[OwnPropertyKeys]] returns duplicate entries
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 1389752
People
(Reporter: acsv2, Unassigned)
Details
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:59.0) Gecko/20100101 Firefox/59.0
Build ID: 20180326160923
Steps to reproduce:
Hello,
according ES6 specification (https://github.com/tc39/ecma262/pull/833), the engine should throw a TypeError if ownKeys have duplicate entries.
OS = Ubuntu 17.10 x64
SpiderMonkey = JavaScript-C60.0
Steps to reproduce:
var proxy = new Proxy({}, {
ownKeys: function (t) {
return ["A", "A"];
}
});
var keys = Object.keys(proxy);
Actual results:
Actual results:
Pass without failures.
Expected results:
Expected results:
TypeError: proxy [[OwnPropertyKeys]] can't report property '"A"' more than once
Actually, only JavaScriptCore supports this specification. V8 have an open issue (https://bugs.chromium.org/p/v8/issues/detail?id=6776).
Component: Untriaged → JavaScript Engine
Product: Firefox → Core
Comment 1•8 years ago
|
||
The example throws a TypeError for me:
> TypeError: proxy [[OwnPropertyKeys]] can't report property '"A"' more than once
Bug 1389752 implemented the change described in <https://github.com/tc39/ecma262/pull/833>.
(In reply to acsv2 from comment #0)
> Actually, only JavaScriptCore supports this specification.
Oh, did they implement this recently, because JSC from last week (svn r230952) doesn't yet implement the spec change.
Hi, sorry about that. This is a misunderstanding, closing this issue.
Status: UNCONFIRMED → RESOLVED
Closed: 8 years ago
Resolution: --- → DUPLICATE
Comment 4•8 years ago
|
||
(In reply to acsv2 from comment #2)
> Hi, sorry about that. This is a misunderstanding, closing this issue.
Sure, no problem! :-)
You need to log in
before you can comment on or make changes to this bug.
Description
•