Bug 311741
| Summary: | Nesting requestClose() shouldn't fire multiple cancel events | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Luke Warlow <lwarlow> |
| Component: | DOM | Assignee: | Luke Warlow <lwarlow> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Local Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| See Also: | https://github.com/web-platform-tests/wpt/pull/59053 | ||
Luke Warlow
```html
<dialog id="dialog">Some Dialog Content</dialog>
<script>
dialog.showModal();
dialog.oncancel = () => {
dialog.requestClose();
};
dialog.requestClose();
</script>
```
This leads to a RangeError: Maximum call stack size exceeded. in WebKIt.
The spec prevents this through CloseWatcher machinery, we should add a guard to prevent this until CloseWatchers are finished and integrated with dialog.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Luke Warlow
Pull request: https://github.com/WebKit/WebKit/pull/62283
Radar WebKit Bug Importer
<rdar://problem/174850509>
EWS
Committed 313239@main (6053a426c6d4): <https://commits.webkit.org/313239@main>
Reviewed commits have been landed. Closing PR #62283 and removing active labels.