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

[TIMOB-26022] TiAPI: Improve Ti.Buffer parity #10028

Merged
merged 4 commits into from May 9, 2018

Conversation

sgtcoolguy
Copy link
Contributor

@sgtcoolguy sgtcoolguy commented May 4, 2018

JIRA: https://jira.appcelerator.org/browse/TIMOB-26022

Description:

  • Cherry-picks the fix from [TIMOB-25906] : iOS Native exceptions not thrown when using run-on-main-thread #9966 necessary to have the errors thrown.
  • Updates the Ti.Buffer tests to be more comprehensive
  • Updates the iOS implementation to be more careful about verifying offsets/lengths of buffers
    • don't just check that the start offset is past the end of buffer or length is too long, but that the combination is OK
    • Don't allow some methods to be ok with extending past the end of a Buffer and only doing partial operations, whereas others would be rigid in bounds checking. Be consistent in bounds checking.
  • When cloning a Buffer retain the byteOrder/type properties. If cloning a Buffer wholesale, retain the value property too.

@build
Copy link
Contributor

build commented May 4, 2018

Messages
📖

💾 Here's the generated SDK zipfile.

Generated by 🚫 dangerJS

Copy link
Collaborator

@hansemannn hansemannn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change looks valid to me. For functional testing, I trust on the unit tests, since I did not work with buffers in deep so far. Let me know if you need an additional review in that case!

@hansemannn hansemannn changed the title Ti.Buffer parity [TIMOB-26022] TiAPI: Improve Ti.Buffer parity May 9, 2018
@hansemannn hansemannn added this to the 7.2.0 milestone May 9, 2018
@hansemannn hansemannn merged commit 2265e07 into tidev:master May 9, 2018
@sgtcoolguy sgtcoolguy deleted the buffer-parity branch May 9, 2018 14:03
@sgtcoolguy sgtcoolguy modified the milestones: 7.2.0, 7.3.0 May 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants