Bug 267494
Summary: | [JSC] Throw RangeError if Set methods are called on an object with negative "size" property | ||
---|---|---|---|
Product: | WebKit | Reporter: | zloirock <zloirock> |
Component: | JavaScriptCore | Assignee: | Alexey Shvayka <ashvayka> |
Status: | RESOLVED FIXED | ||
Severity: | Normal | CC: | ashvayka, keith_miller, mark.lam, webkit-bug-importer, ysuzuki |
Priority: | P2 | Keywords: | InRadar |
Version: | WebKit Nightly Build | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.webkit.org/show_bug.cgi?id=251510 | ||
Bug Depends on: | |||
Bug Blocks: | 268026 |
zloirock
new Set([1, 2, 3]).difference({
size: -1,
has() {
return false;
},
keys() {
return { next() { return { done: true }; } };
},
});
should be a RangeError, GetSetRecord step 7.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
zloirock
Similar V8 issue https://bugs.chromium.org/p/v8/issues/detail?id=14559
Radar WebKit Bug Importer
<rdar://problem/121310940>
Alexey Shvayka
Pull request: https://github.com/WebKit/WebKit/pull/23689
EWS
Committed 274009@main (eeda72823e71): <https://commits.webkit.org/274009@main>
Reviewed commits have been landed. Closing PR #23689 and removing active labels.