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

Define ck() based on cfg(debug_assertions) #182

Merged
merged 2 commits into from Jun 6, 2019

Conversation

@toolness
Copy link
Contributor

toolness commented Jun 5, 2019

While attempting to investigate #178, I noticed that the ck() function, which checks to see if there's a GL error and panics if so, wasn't running on my debug build. Its definition was conditional based on whether cfg(debug) is set, but I'm not actually sure what that is or how to set it, whereas cfg(debug_assertions) does the trick.

This PR changes the conditional compilation to be based on debug_assertions. However, if that's not the right way to approach this, please let me know!

@toolness
Copy link
Contributor Author

toolness commented Jun 5, 2019

I dug into GL error handling a bit more and found out that there are only a handful of standard GL errors so I made the panic message a bit more helpful in 7563e95.

@pcwalton
Copy link
Collaborator

pcwalton commented Jun 6, 2019

Yikes, good catch!

@pcwalton pcwalton merged commit 412d35a into servo:master Jun 6, 2019
2 checks passed
2 checks passed
Travis CI - Pull Request Build Passed
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.