Bug 275055

Summary: [Regression] Spread of class should not inherit instanceof
Product: WebKit Reporter: Max Schmitt <max>
Component: JavaScriptCoreAssignee: Yusuke Suzuki <ysuzuki>
Status: RESOLVED FIXED    
Severity: Major CC: ahmad.saleem792, lloisrrois, webkit-bug-importer, ysuzuki, yurys
Priority: P1 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Max Schmitt
Reported 2024-06-03 06:54:42 PDT
RANGE: https://github.com/WebKit/WebKit/compare/cd9be0fded51cea4c2c3a7c9a21d6b4d341df09d...91f787886ac542eb4148d991b629c028f389f0cf Potential commit which broke it: https://github.com/WebKit/WebKit/commit/804d44f89619bfae3e5e2e21a07669b1fb320d57 Repro: ```ts class Test {field1 = 'foo';} const t1 = { ...new Test() }; console.log(t1 instanceof Test); ``` Expected: false Actual: true V8/Spidermonkey return false. Downstream issue: https://github.com/microsoft/playwright/issues/31132
Attachments
Max Schmitt
Comment 1 2024-06-03 07:01:08 PDT
Was able to reproduce it in Safari Technology Preview - t1 is a class instance while in V8/Spidermonkey its just an object.
Radar WebKit Bug Importer
Comment 2 2024-06-03 09:21:39 PDT
Yusuke Suzuki
Comment 3 2024-06-04 13:07:42 PDT
EWS
Comment 4 2024-06-04 14:09:59 PDT
Committed 279713@main (2069a352b203): <https://commits.webkit.org/279713@main> Reviewed commits have been landed. Closing PR #29511 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.