fix(WebSocket): don't patch EventTarget methods twice#235
fix(WebSocket): don't patch EventTarget methods twice#235tlancina wants to merge 1 commit intoangular:masterfrom tlancina:master
Conversation
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. Closes #233.
|
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed, please reply here (e.g.
|
1 similar comment
|
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed, please reply here (e.g.
|
|
I signed it ✏️ |
|
CLAs look good, thanks! |
1 similar comment
|
CLAs look good, thanks! |
|
@vicb Could you merge this and cut a new Zone release. This is blocking Ionic. |
|
Thanks! |
On older versions of Chrome, patching via property descriptors isn't available, but unlike Safari, window.EventTarget exists and is already patched, so patching EventTarget methods on WebSocket.prototype again causes them to call the first patched method which then infinitely calls itself.
I didn't provide a test because the tests fail on any older Chrome version (not sure the exact range, tested on 39 and 41). I don't have access to SauceLabs, but I believe #192 will cause failure on at least the Android 4.4 case.
This is fairly high priority for Ionic as it seems to crash Android on some devices when using livereload.