Bug 217308 - A question about constructor
Summary: A question about constructor
Status: RESOLVED DUPLICATE of bug 220429
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Local Build
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-10-04 23:28 PDT by NWU_NISL
Modified: 2021-02-01 02:26 PST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description NWU_NISL 2020-10-04 23:28:38 PDT
#Version:
d940b47

#Testcase:
var f = function (){
    var x = 42; 
    new x(x = function (){});
}; 
f();

#Command:
./webkit/WebKitBuild/Release/bin/jsc testcase.js

#Output:

#Expected output:
TypeError: x is not a constructor

#Description:
When executing the above testcase, other engines threw a TypeError exception, such as v8, spiderMonkey, etc. But JavaScriptCore passed normally without throwing any exceptions.
Comment 1 Radar WebKit Bug Importer 2020-10-05 17:01:38 PDT
<rdar://problem/69977289>
Comment 2 Yusuke Suzuki 2021-02-01 02:26:07 PST

*** This bug has been marked as a duplicate of bug 220429 ***
Comment 3 Yusuke Suzuki 2021-02-01 02:26:20 PST
Thanks, this is fixed in bug 220429!