Generate SDK JNI headers for Bundle

RESOLVED FIXED in Firefox 42



Firefox for Android
2 years ago
2 years ago


(Reporter: jchen, Assigned: jchen)


Firefox 42

Firefox Tracking Flags

(firefox42 fixed)



(3 attachments)

We need JNI access to Bundle for NativeJSContainer.
Created attachment 8639508 [details] [diff] [review]
Adjust white spacing in generated files
Attachment #8639508 - Flags: review+
Created attachment 8639509 [details] [diff] [review]
Fix SDKProcessor API version detection;

The API version detection functionality was broken in SDKProcessor
because we were passing in "Lpackage/Class;" as the class name rather
than just "package/Class". Also, some classes have a weird situation
where some methods were moved around in later API versions. For example,
some put* and get* methods in Bundle were moved to BaseBundle in API 21.
If we only checked BaseBundle.put*, we would think they are API 21+
only. The workaround is to check both the top-level class and the
declaring class for a member, and choose the lower API level as the
minimal API level for that member.

This patch also fixes bugs in including the right class members.
For SDKProcessor we want to include all public members of a class,
including inherited members, because the private/protected members are
not part of the public API. For AnnotationProcessor, we want to include
all the members declared in that class, including private and
protected members, because we may want to access private/protected
members of our own Java classes from C++.
Attachment #8639509 - Flags: review?(snorp)
Created attachment 8639510 [details] [diff] [review]
Generate JNI bindings for Bundle;

Add Bundle to the list of SDK classes to generate JNI bindings for. The
generated bindings, like other SDK classes, use XPCOM-style nsresult
to indicate success/failure, and return values through out-parameters.
Attachment #8639510 - Flags: review?(snorp)
Attachment #8639509 - Flags: review?(snorp) → review+
Attachment #8639510 - Flags: review?(snorp) → review+

Comment 4

2 years ago
Last Resolved: 2 years ago
status-firefox42: affected → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 42
You need to log in before you can comment on or make changes to this bug.