Skip to content

fix(ios): stop using artifical state handler via animated setter on uiviewcontroller #8797

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

Merged
merged 1 commit into from
Aug 28, 2020

Conversation

NathanWalker
Copy link
Contributor

No description provided.

@cla-bot cla-bot bot added the cla: yes label Aug 28, 2020
@NathanWalker NathanWalker merged commit 6b9b234 into master Aug 28, 2020
@NathanWalker NathanWalker deleted the fix/modal-ios-animate-handling branch August 28, 2020 02:59
@farfromrefug
Copy link
Collaborator

Can you explain the reason of that change ? Seems weird and less error prone than storing it in the corresponding controller

@NathanWalker
Copy link
Contributor Author

NathanWalker commented Aug 28, 2020

@farfromrefug what was being done here is considered bad practice with {N}. animated setter on a uiviewcontroller instance has no meaning and was merely being temporarily stored there for usage when modal closes as a matter of state. Further using a generic property on a native instance object is dangerous as any arbitrary property could end up being readonly by the native instance itself (whether by a readonly native property of same name or otherwise) as was the case here and indeed caused an app crash under v8 iOS.

@farfromrefug
Copy link
Collaborator

I knew it was related to a crash in the v8 runtime :). I can get the fact we should not use existing native properties though i would prefer the crash being handled on the V8 side ;)
Thanks for the explanation. At least now it is commented here why this change was made (which can get important in the future)

NathanWalker added a commit that referenced this pull request Aug 28, 2020
tarunama pushed a commit to tarunama/NativeScript that referenced this pull request Sep 9, 2020
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.

2 participants