Bug 275055
| Summary: | [Regression] Spread of class should not inherit instanceof | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Max Schmitt <max> |
| Component: | JavaScriptCore | Assignee: | 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
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 | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Max Schmitt
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
<rdar://problem/129168077>
Yusuke Suzuki
Pull request: https://github.com/WebKit/WebKit/pull/29511
EWS
Committed 279713@main (2069a352b203): <https://commits.webkit.org/279713@main>
Reviewed commits have been landed. Closing PR #29511 and removing active labels.