Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: include.preload.js

Issue 29349737: Issue 1727 - Fix WebSocket constructor without second argument in Chrome 47 (Closed)
Patch Set: Omit the second argument if absent Created Aug. 11, 2016, 3:38 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include.preload.js
===================================================================
--- a/include.preload.js
+++ b/include.preload.js
@@ -406,7 +406,11 @@
if (!(this instanceof WrappedWebSocket)) return RealWebSocket();
if (arguments.length < 1) return new RealWebSocket();
- var websocket = new RealWebSocket(url, protocols);
+ var websocket;
+ if (arguments.length == 1)
+ websocket = new RealWebSocket(url);
+ else
+ websocket = new RealWebSocket(url, protocols);
Wladimir Palant 2016/08/15 12:33:24 Why make assumptions about the arguments in the fi
Wladimir Palant 2016/08/15 12:45:36 This will also allow dropping protocols parameter
Wladimir Palant 2016/08/15 13:01:24 Never mind, calling RealWebSocket.apply() won't wo
Sebastian Noack 2016/08/15 13:06:10 See patchset #2 (and the related discussin) for a
checkRequest(websocket.url, function(blocked)
{
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld