Closed Bug 1182641 Opened 10 years ago Closed 10 years ago

Convert ANRReporter to new JNI scheme

Categories

(Firefox for Android Graveyard :: General, defect)

defect
Not set
normal

Tracking

(firefox42 fixed)

RESOLVED FIXED
Firefox 42
Tracking Status
firefox42 --- fixed

People

(Reporter: jchen, Assigned: jchen)

References

Details

Attachments

(3 files)

Use the new autogenerated JNI stubs for ANRReporter
Switch from using mozglue stubs to using direct native functions.
Move the native implementation from AndroidJNI.cpp to ANRReporter.cpp
Attachment #8637278 - Flags: review?(snorp)
Attachment #8637279 - Flags: review+
Attachment #8637281 - Flags: review?(snorp)
Attachment #8637278 - Flags: review?(snorp) → review+
Comment on attachment 8637281 [details] [diff] [review] Implement new native methods for ANRReporter (v1) Review of attachment 8637281 [details] [diff] [review]: ----------------------------------------------------------------- ::: widget/android/ANRReporter.cpp @@ +10,5 @@ > + > +namespace mozilla { > + > +bool > +ANRReporter::RequestNativeStack(bool aUnwind) I'm assuming everything in here is copy/pasted from AndroidJNI? ::: widget/android/AndroidBridge.cpp @@ +250,5 @@ > jClose = inputStream.getMethod("close", "()V"); > jAvailable = inputStream.getMethod("available", "()I"); > > InitAndroidJavaWrappers(jEnv); > + ANRReporter::Init(); Any idea what kind of impact this has on startup?
Attachment #8637281 - Flags: review?(snorp) → review+
(In reply to James Willcox (:snorp) (jwillcox@mozilla.com) from comment #4) > Comment on attachment 8637281 [details] [diff] [review] > Implement new native methods for ANRReporter (v1) > > ::: widget/android/ANRReporter.cpp > @@ +10,5 @@ > > + > > +namespace mozilla { > > + > > +bool > > +ANRReporter::RequestNativeStack(bool aUnwind) > > I'm assuming everything in here is copy/pasted from AndroidJNI? Yep! > ::: widget/android/AndroidBridge.cpp > @@ +250,5 @@ > > jClose = inputStream.getMethod("close", "()V"); > > jAvailable = inputStream.getMethod("available", "()I"); > > > > InitAndroidJavaWrappers(jEnv); > > + ANRReporter::Init(); > > Any idea what kind of impact this has on startup? Should be very small. ANRReporter::Init just registers JNI calls through JNIEnv::RegisterNatives. We also saved some time by not trying to find these libxul symbols in mozglue.
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: