Closed Bug 1186467 Opened 9 years ago Closed 9 years ago

Convert NativeJSContainer to use new JNI scheme

Categories

(Firefox for Android Graveyard :: General, defect)

All
Android
defect
Not set
normal

Tracking

(firefox42 fixed)

RESOLVED FIXED
Firefox 42
Tracking Status
firefox42 --- fixed

People

(Reporter: jchen, Assigned: jchen)

References

Details

Attachments

(4 files)

NativeJSContainer currently use mozglue stubs, but we should convert it to use the new JNI scheme that automatically forward native calls to corresponding instances.
Depends on: 1186517
Depends on: 1186530
This patch adds:
* Conversion operator from String::Param to String::LocalRef.
* More overloads of the jni::ThrowException function.
* name members to built-in types like jni::Object, jni::String, etc.
  This allows using jni::Accessors::EnsureClassRef on built-in types
  to get built-in class refs (e.g. jclass for java/lang/String).
* Ability to implicitly convert LocalRef<Cls> to LocalRef<Object>
* Fixes for bugs in LocalRef/GlobalRef where new refs are not created.
Attachment #8641157 - Flags: review?(snorp)
JNIObject is the base class for any class that wish to use per-instance
native methods. It encapsulates the long native pointer that used to be
in NativeJSContainer.
Attachment #8641158 - Flags: review?(snorp)
This patch makes NativeJSContainer use per-instance native methods.
NativeJSContainer is also updated to use smart JNI reference classes.
Attachment #8641160 - Flags: review?(snorp)
Attachment #8641157 - Flags: review?(snorp) → review+
Attachment #8641158 - Flags: review?(snorp) → review+
Comment on attachment 8641160 [details] [diff] [review]
Rewrite NativeJSContainer to use new native JNI scheme (v1)

Review of attachment 8641160 [details] [diff] [review]:
-----------------------------------------------------------------

Lovely.
Attachment #8641160 - Flags: review?(snorp) → review+
Depends on: 1206822
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: