Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

always handle async sendCommand rejections #703

Merged
merged 1 commit into from
Sep 26, 2016
Merged

Conversation

brendankenny
Copy link
Member

@brendankenny brendankenny commented Sep 24, 2016

I was looking at the promise+event and promise+timeout async patterns we use in a few places with driver.sendCommand() and noticed that we were dropping possible promise rejections in several places (and even leaving promise chains behind completely a couple of times).

In practice, the debugger interface serializes our commands for us, so the dropped promise chains likely aren't a problem, and I have yet to see a failure on any domain enabling (though I suppose it might be hard to recognize on master when it does happen without an unhandled rejection warning), but better to have these locked down, especially since they serve as the copy/paste examples for how to use the protocol in audits, like in #691.

@brendankenny brendankenny changed the title handle async sendCommand rejections always handle async sendCommand rejections Sep 24, 2016
@paulirish paulirish merged commit 27343f5 into master Sep 26, 2016
@paulirish paulirish deleted the promisespromises branch September 26, 2016 20:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants