New issue
Advanced search Search tips

Issue 765862 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
Cc:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug



Sign in to add a comment

Remove JavaObjectPtr

Project Member Reported by yucliu@chromium.org, Sep 16 2017

Issue description

JavaObjectPtr is alias to unique_ptr<ScopedJavaGlobalRef<jobject>>. It causes confusing because it's a triple state variable:

1. unique_ptr contains null ScopedJavaGlobalRef.
2. ScopedJavaGlobalRef contains null jobject.
3. Non null jobject.

In most of the cases, we just need two state. It's possible to pass ScopedJavaGlobalRef without unique_ptr. So we can remove this type. 
 
Cc: torne@chromium.org

Sign in to add a comment