Clean up CastChannelOpenFunction not to parse IP address twice |
||||
Issue descriptionWhat steps will reproduce the problem? (1) Call e.g. the open() API for CastChannel, with a malformed IP literal. What is the expected output? Expect that Chrome reports an error. What do you see instead? Chrome will CHECK. This makes Chrome fragile to bugs in the Media Router / Cast Extension; the API should be switched to fail on malformed input, rather than crashing the entire browser.
,
Mar 30 2016
This doesn't repro for me.
chrome.cast.channel.open({ipAddress: 'foo', port: 8009, auth: 'ssl_verified'}, function (c) {});
undefined
extensions::lastError:133 Unchecked runtime.lastError while running cast.channel.open: Invalid connect_info (invalid IP address)reportIfUnchecked @ extensions::lastError:133handleResponse @ extensions::sendRequest:78
That being said I don't object to setting some kind of "unknown error" in open() if there's a possibility of something weird happening after all of the other validations occur.
,
Apr 1 2016
Yes, you're right; seems strange that we do two separate parsing operations, one to verify and one to get the value; will take a look at cleaning that up.
,
Nov 28 2016
CJ, want to take a stab at this bit of refactoring?
,
Nov 30 2016
Looks like it was already done. Closing out. |
||||
►
Sign in to add a comment |
||||
Comment 1 by w...@chromium.org
, Mar 29 2016Status: Assigned (was: Untriaged)