Closed Bug 987281 Opened 12 years ago Closed 12 years ago

Refactor AuoLocalJNIFrame

Categories

(Firefox for Android Graveyard :: General, defect)

All
Android
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 31

People

(Reporter: jchen, Assigned: jchen)

References

Details

Attachments

(1 file)

AutoLocalJNIFrame could use some improvements
This patch changes the default number of frame entries from 128 to 15. The dalvik stack is very limited, and if we're using more than 15 local references in a JNI function, we might be doing something we shouldn't be doing. It also changes CheckForException() to use AndroidBridge::HandleUncaughtException() to make uncaught exceptions more noticeable.
Attachment #8395838 - Flags: review?(blassey.bugs)
Comment on attachment 8395838 [details] [diff] [review] Refactor AutoLocalJNIFrame (v1) Review of attachment 8395838 [details] [diff] [review]: ----------------------------------------------------------------- ::: widget/android/AndroidBridge.h @@ +516,5 @@ > }; > > class AutoLocalJNIFrame { > public: > + AutoLocalJNIFrame(int nEntries = 15) why 15? (note: 15 is still more reasonable than 128)
Attachment #8395838 - Flags: review?(blassey.bugs) → review+
(In reply to Brad Lassey [:blassey] (use needinfo?) from comment #2) > > why 15? (note: 15 is still more reasonable than 128) We ask for (nEntries + 1) entries to account for possible exception taking up one more spot, and 16 total slots seems like a nice power-of-2 number to use. FWIW, the Dalvik stack supports 512 total slots per thread.
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 31
Blocks: 988800
No longer blocks: 988800
Depends on: 988800
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: