Skip to content
  • torne's avatar
    android: JavaRef type behaviour improvements. · 7588d910
    torne authored
    Several improvements to the behaviour of JavaRef types:
    
    1) Make JavaRef's default constructor public. You can get a null JavaRef
       by conversion from nullptr_t already, so default-constructing one
       seems fine too.
    2) Replace templating on a second generic type U with simply JavaRef<T>.
       All existing usage works fine with this; it simplifies the
       implementation and creates fewer ambiguities.
    3) Add comments to ScopedJavaLocalRef about the behaviour of the
       constructor and Reset() overloads that take (JNIEnv*, T) as
       parameters, as the current behaviour is confusing but can't yet be
       changed.
    
    BUG=519562
    
    Review-Url: https://codereview.chromium.org/2534973002
    Cr-Commit-Position: refs/heads/master@{#435210}
    7588d910