The Addon-SDK expects gContextMenuContentData to exist in the context menu code.

RESOLVED FIXED in seamonkey2.37

Status

defect
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: philip.chee, Assigned: philip.chee)

Tracking

Trunk
seamonkey2.37
Dependency tree / graph

Firefox Tracking Flags

(firefox40 affected)

Details

Attachments

(1 attachment)

Assignee

Description

4 years ago
http://forums.mozillazine.org/viewtopic.php?p=14093969#p14093969

console.error: no-eu-cookie-uk:
  Message: TypeError: this.contextMenuContentData is undefined
  Stack:
    updateItemVisibilities@resource://gre/modules/addons/XPIProvider.jsm ->
    jar:file:///C:/Users/lj/AppData/Roaming/Mozilla/SeaMonkey/Profiles/lmf7vii4.test2/extensions/jid1-KzOGWgsW3Ao4Q@jetpack.xpi!/bootstrap.js ->
    resource://gre/modules/commonjs/toolkit/loader.js ->
    resource://gre/modules/commonjs/sdk/context-menu.js:1015:11
Assignee

Comment 1

4 years ago
Firefox implementation:
http://mxr.mozilla.org/comm-central/source/mozilla/browser/base/content/content.js?rev=acd77f938db4&mark=135-224#135

> -function nsContextMenu(aXulMenu, aBrowser, aIsShift) {
> +function nsContextMenu(aXulMenu, aIsShift, aEvent) {

aBrowser was introduced for Firefox compatibility. Now that Firefox has removed that argument so should we.
Attachment #8596174 - Flags: review?(neil)
Comment on attachment 8596174 [details] [diff] [review]
Patch v1.0 Proposed implementation.

Seems reasonable.
Attachment #8596174 - Flags: review?(neil) → review+
Assignee

Comment 3

4 years ago
Pushed to comm-central
http://hg.mozilla.org/comm-central/rev/5b258ec074d1
Status: ASSIGNED → RESOLVED
Last Resolved: 4 years ago
OS: Unspecified → All
Hardware: Unspecified → All
Resolution: --- → FIXED
Target Milestone: --- → seamonkey2.37
Assignee

Updated

4 years ago
Depends on: 1160500
Assignee

Updated

4 years ago
Blocks: 1160500
No longer depends on: 1160500
Comment on attachment 8596174 [details] [diff] [review]
Patch v1.0 Proposed implementation.

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

Noticed these while I updated the trunk for my bug 1099585 patch.  I'll fix these endings
on that patch if no one has any objections.

::: suite/common/nsContextMenu.js
@@ +63,5 @@
> +    };
> +    subject.wrappedJSObject = subject;
> +    // Notifies the Addon-SDK which then populates addonInfo.
> +    Services.obs.notifyObservers(subject, "content-contextmenu", null);
> +  

extra space nit.

@@ +74,5 @@
> +      try {
> +        let imageCache = Components.classes["@mozilla.org/image/tools;1"]
> +                                   .getService(Components.interfaces.imgITools)
> +                                   .getImgCacheForDocument(doc)
> +        let props = imageCache.findEntryProperties(popupNode.currentURI);

from line #75 - 77, there are CRLF endings.
You need to log in before you can comment on or make changes to this bug.