Bug 34967
Summary: | Safari calls onclose event handler in close() call. | ||
---|---|---|---|
Product: | WebKit | Reporter: | Fumitoshi Ukai <ukai> |
Component: | WebCore JavaScript | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED CONFIGURATION CHANGED | ||
Severity: | Normal | CC: | annevk, ap, joenotcharles |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | Mac | ||
OS: | All |
Fumitoshi Ukai
Safai calls onclose event handler in close() call.
WebSocket API spec says, the close() must close the Web Socket connection, and closing the connection immediately cause a task to be queued to fire a close event.
So, onclose event handler should be fired after javascript code that includes close() method call finished.
See https://bugs.webkit.org/show_bug.cgi?id=34636
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Anne van Kesteren
https://github.com/WebKit/WebKit/blob/main/Source/WebCore/Modules/websockets/WebSocket.cpp#L414C1-L441 appears to delegate to the channel now.