Closed Bug 843300 Opened 11 years ago Closed 11 years ago

Duplicate event listener registration in JavaAddonManager when don't keep activities is checked

Categories

(Firefox for Android Graveyard :: General, defect)

All
Android
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 22

People

(Reporter: kats, Assigned: kats)

References

Details

Attachments

(1 file)

From https://bugzilla.mozilla.org/show_bug.cgi?id=842946#c3:

W/EventDispatcher( 1668): java.lang.IllegalArgumentException
W/EventDispatcher( 1668): 	at org.mozilla.gecko.util.EventDispatcher.registerEventListener(EventDispatcher.java:30)
W/EventDispatcher( 1668): 	at org.mozilla.gecko.JavaAddonManager.init(JavaAddonManager.java:76)
W/EventDispatcher( 1668): 	at org.mozilla.gecko.BrowserApp.onCreate(BrowserApp.java:240)
W/EventDispatcher( 1668): 	at android.app.Activity.performCreate(Activity.java:5008)
W/EventDispatcher( 1668): 	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
W/EventDispatcher( 1668): 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2023)
W/EventDispatcher( 1668): 	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)
W/EventDispatcher( 1668): 	at android.app.ActivityThread.access$600(ActivityThread.java:130)
W/EventDispatcher( 1668): 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)
W/EventDispatcher( 1668): 	at android.os.Handler.dispatchMessage(Handler.java:99)
W/EventDispatcher( 1668): 	at android.os.Looper.loop(Looper.java:137)
W/EventDispatcher( 1668): 	at android.app.ActivityThread.main(ActivityThread.java:4745)
W/EventDispatcher( 1668): 	at java.lang.reflect.Method.invokeNative(Native Method)
W/EventDispatcher( 1668): 	at java.lang.reflect.Method.invoke(Method.java:511)
W/EventDispatcher( 1668): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
W/EventDispatcher( 1668): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
W/EventDispatcher( 1668): 	at dalvik.system.NativeStart.main(Native Method)

This should be benign unless somebody tries to use a Java addon, in which case we will run the Dex:Load handler twice and things will probably be a little weird.
Attached patch PatchSplinter Review
Attachment #716203 - Flags: review?(mark.finkle)
Attachment #716203 - Flags: review?(mark.finkle) → review+
https://hg.mozilla.org/mozilla-central/rev/6c7e514acc36
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 22
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: