You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.
Setting any of the WebSocket event handlers then causes infinite recursion as the "original" handler that gets called by the second patch is the already patched one from when the EventTarget handlers were patched: utils.ts#L86
We had reports of this happening on Android 4.4 and 5.1, but I've only been able to reproduce on device with 4.4, though in theory it would happen for any devices where patching via property descriptors is unavailable.
Happy to submit a PR, but there is a lot going on between various different browsers and I'm not entirely sure what the best solution that wouldn't break other things is.
The text was updated successfully, but these errors were encountered:
closes #235
On older versions of Chrome, patching via property descriptors isn't
available, but unlike Safari, window.EventTarget exists and is already
patched, so the EventTarget methods on WebSocket.prototype don't need to
be patched again.
Closesangular/zone.js#233.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
It looks like when
canPatchViaPropertyDescriptor()
is false, WebSocket's addEventListener is patched again: property-descriptor.ts#L29, websocket.ts#L6 after already being patched as part of browser.ts#L27.Setting any of the WebSocket event handlers then causes infinite recursion as the "original" handler that gets called by the second patch is the already patched one from when the EventTarget handlers were patched: utils.ts#L86
You can reproduce minimally on desktop Chrome by breaking on property-descriptor.ts#L14 and having it return false: http://plnkr.co/edit/XF2mZMA6XBHuApVz6BJ4?p=preview (line 736 for me).
We had reports of this happening on Android 4.4 and 5.1, but I've only been able to reproduce on device with 4.4, though in theory it would happen for any devices where patching via property descriptors is unavailable.
Happy to submit a PR, but there is a lot going on between various different browsers and I'm not entirely sure what the best solution that wouldn't break other things is.
The text was updated successfully, but these errors were encountered: