Closed Bug 670284 Opened 9 years ago Closed 9 years ago

Show compatibility error for using nsIJSON in Firefox 7

Categories

(addons.mozilla.org Graveyard :: Compatibility Tools, defect, P2, major)

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: jorgev, Assigned: basta)

Details

(Whiteboard: [fx7])

As explained in bug 645922, the main methods in nsIJSON have been removed for Firefox 7, and now the global JSON object should be used instead. Pretty much every use of nsIJSON in an add-on has been eliminated, so we should check for any instance of nsIJSON.

This should show an error and prevent the add-on from being upgraded.

Message:

The encode and decode methods in nsIJSON have been removed in Firefox 7. You can use the methods in the global JSON object instead. See <LINKED_MDC_ARTICLE> for more information.

Link: https://developer.mozilla.org/En/Using_native_JSON

Affected add-on:

https://addons.mozilla.org/en-US/firefox/addon/wolfram-alpha-google/
Assignee: nobody → mbasta
Target Milestone: Q3 2011 → 6.1.7
Merged:

https://github.com/mozilla/amo-validator/commit/572010cfde71f5728c1adebc4aec0c26387193dc
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
https://addons.allizom.org/en-US/firefox/addon/wolfram-alpha-google is not one of the add-ons that failed validation.

reopening so that basta can investigate
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
The WolframAlpha Google extension uses a technique that we can't currently detect with the validator. They're aliasing Components.interfaces and Components.classes to members of non-existant objects (for reasons that are difficult to explain concisely). I'm working now to make the validator accept those aliases and make the non-existant objects existant when the members are set.

TL;DR The issue with the WA Google widget is somewhat unrelated to this bug; feel free to keep it open or close it as necessary.
The 'Deprecated nsIJSON methods in use.' error is shown for  https://addons.allizom.org/en-US/developers/addon/google-date-keeper/validation-result/44981

I have also checked a bunch of other add-ons which use this method(Browse periodically,Feed Sidebar, Download Master Toolbar)

Basta, please file a separate bug to track comment 3. If you close this bug, I'll verify it.
Target Milestone: 6.1.7 → 6.1.8
Status: REOPENED → RESOLVED
Closed: 9 years ago9 years ago
Resolution: --- → FIXED
using nSIJSON shows a warning instead of an error now. Marking this verified at https://addons.allizom.org/en-US/developers/addon/download-master-toolbar/validation-result/63116

Issue from comment 3 is being tracked at bug 673536
Status: RESOLVED → VERIFIED
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.