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

Remove direct ivar access on non-self object to fix mocking case #trivial #1066

Merged
merged 3 commits into from
Aug 3, 2018

Conversation

Adlai-Holler
Copy link
Member

After #1061, if your unit tests use mock nodes you may get a crash because we access ivars on the mock display node. It is unsafe to access ivars on mock objects.

This diff makes it so that we send the node a message. If it's a mock, the mocking system will forward the message to the real instance.

@Adlai-Holler Adlai-Holler merged commit c5b1d09 into master Aug 3, 2018
@Adlai-Holler Adlai-Holler deleted the AHRemoveDirectIvar branch August 3, 2018 23:35
mikezucc pushed a commit to mikezucc/Texture that referenced this pull request Oct 2, 2018
…vial (TextureGroup#1066)

* Remove direct ivar access on non-self object to prevent issues when the object is actually a mock

* Comment

* Remove lock to avoid deadlock risk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants