Closed Bug 722627 Opened 12 years ago Closed 12 years ago

NativeWindow.contextmenus.remove creates a JS exception

Categories

(Firefox for Android Graveyard :: General, defect)

x86
Linux
defect
Not set
normal

Tracking

(firefox11 verified, firefox12 verified, firefox13 verified, fennec11+)

VERIFIED FIXED
Firefox 13
Tracking Status
firefox11 --- verified
firefox12 --- verified
firefox13 --- verified
fennec 11+ ---

People

(Reporter: mfinkle, Assigned: mfinkle)

Details

Attachments

(1 file)

Attached patch patchSplinter Review
NativeWindow.contextmenus.remove sets the item stored in the object map to null. When we attempt to show the context menu, we iterate over the object map and try to use the objects. This causes a JS exception and the menu is not displayed.

Instead of setting the item to null, we should delete it from the object map. This patch fixes the problem.

The add-on here has a "Copy Link" context menu. if you disable/enable the add-on the menbu will fail to display when long tapping on a link. The patch makes it work.
Attachment #592999 - Flags: review?(wjohnston)
Comment on attachment 592999 [details] [diff] [review]
patch

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

DOH!
Attachment #592999 - Flags: review?(wjohnston) → review+
Assignee: nobody → mark.finkle
Target Milestone: --- → Firefox 13
https://hg.mozilla.org/mozilla-central/rev/69ca6e6c57ea
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Comment on attachment 592999 [details] [diff] [review]
patch

Regression caused by (bug #): bug 695460
User impact if declined: extensions won't uninstall correctly among other problems they might have
Testing completed (on m-c, etc.): on mc for a few days. tested with the sample addon mfinkle built
Risk to taking this patch (and alternatives if risky): very low. mobile only. bug fix.
String changes made by this patch: none.
Attachment #592999 - Flags: approval-mozilla-beta?
Attachment #592999 - Flags: approval-mozilla-aurora?
Comment on attachment 592999 [details] [diff] [review]
patch

[Triage Comment]
Mobile only - approved for Aurora 12 and Beta 11.
Attachment #592999 - Flags: approval-mozilla-beta?
Attachment #592999 - Flags: approval-mozilla-beta+
Attachment #592999 - Flags: approval-mozilla-aurora?
Attachment #592999 - Flags: approval-mozilla-aurora+
Verified fixed on:

Firefox 13.0a1 (2012-02-07)
20120207031136
http://hg.mozilla.org/mozilla-central/rev/b077059c575a
Device: HTC Desire Z
OS: Android 2.3.3

Firefox 12.0a2 (2012-02-06)
20120206042011
http://hg.mozilla.org/releases/mozilla-aurora/rev/9fb0c06ceb49
Device: HTC Desire Z
OS: Android 2.3.3

Firefox 11.0
20120206202409
http://hg.mozilla.org/releases/mozilla-beta/rev/1c0aba74d116
Device: HTC Desire Z
OS: Android 2.3.3
Status: RESOLVED → VERIFIED
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: