Bug 195443 - Wrong Realization of Reflect.ownKeys
Summary: Wrong Realization of Reflect.ownKeys
Status: RESOLVED DUPLICATE of bug 185211
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-03-07 17:20 PST by sunlili
Modified: 2020-05-04 16:38 PDT (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description sunlili 2019-03-07 17:20:16 PST
Hello,
I run following code in lastest JavascriptCore, the result is wrong. TypeError should be thrown when returns duplicate entries.

var proxy = new Proxy({}, {
  ownKeys: function(target) {
    print("in ownKeys");
    return ['a','b','a']; 
  },
});
print(Reflect.ownKeys(proxy));
print("BT_FLAG");

SpiderMonkey and V8 throw a TypeError: 'ownKeys' on proxy: trap returned duplicate entries, However, JavascriptCore execute without failures.

BT group
2019.3.8
Comment 1 Radar WebKit Bug Importer 2019-03-07 19:36:59 PST
<rdar://problem/48700630>
Comment 2 Alexey Shvayka 2020-05-04 16:38:48 PDT

*** This bug has been marked as a duplicate of bug 185211 ***