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

JNI: Fixed local-refs overflow in Document.insertRevisionWithHistory #64

Merged
merged 2 commits into from
Feb 17, 2016

Commits on Feb 17, 2016

  1. Configuration menu
    Copy the full SHA
    c167c99 View commit details
    Browse the repository at this point in the history
  2. JNI: Fixed local-refs overflow in Document.insertRevisionWithHistory

    This function can use an arbitrary number of local JNI refs (one for
    each item in the history array), so request capacity to handle them.
    Unfortunately the maximum local-ref capacity is limited, and the actual
    limit is unknown (implementation-specific but not available via API),
    so we'll restrict ourselves to 200 (MaxLocalRefsToUse.) Android's limit
    is 512.
    
    If we have too many strings, copy the excess ones to the heap and
    immediately release their JNI refs during the iteration.
    
    Fixes couchbase/couchbase-lite-android#782
    snej committed Feb 17, 2016
    Configuration menu
    Copy the full SHA
    b9e6bfc View commit details
    Browse the repository at this point in the history