-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
DelegateProxy bugfixes + test cases #3425
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
andersio
force-pushed
the
delegate-proxy-bugfix
branch
from
March 30, 2017 10:38
c5db44a
to
24f0212
Compare
andersio
force-pushed
the
delegate-proxy-bugfix
branch
from
March 30, 2017 10:39
24f0212
to
6b38abc
Compare
andersio
commented
Mar 30, 2017
let proxy = object.associations.value(forKey: key)! | ||
proxy.forwardee = (delegate as! Delegate) | ||
proxy.forwardee = (delegate as! Delegate?) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the culprit. @akashivskyy reported a EXC_BAD_ACCESS trap in the [UISearchController dealloc]
, which uncovered the mishandling of the optional argument here.
andersio
changed the title
Fixed an bug preventing the forwardee from being cleared in
[WIP] DelegateProxy bugfixes
Mar 30, 2017
DelegateProxy
.
andersio
changed the title
[WIP] DelegateProxy bugfixes
DelegateProxy bugfixes + test cases
Mar 30, 2017
It happened on a selector when the proxy has a forwardee, is implemented by the forwardee and is not implemented by the proxy.
andersio
force-pushed
the
delegate-proxy-bugfix
branch
from
March 30, 2017 11:53
325f98b
to
a9631a0
Compare
mdiep
approved these changes
Mar 30, 2017
Nicely done. 👏 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
6b38abc fixed the crash when setting
DelegateProxy.forwardee
tonil
.d0b874f changed
DelegateProxy
to always complete its signals when the delegator has deinitialized. The current version would not have the signals completed if the proxy is retained externally (w.r.t.DelegateProxy.proxy
).a9631a0 fixed a false negative in
DelegateProxy.responds(to:)
, which causes it not reporting an implemented requirement in a circumstance.79add39 added a bunch of test cases for
DelegateProxy
.f21fb2b was a minor refactoring.