Show compatibility error for using nsIJSON in Firefox 7

VERIFIED FIXED in 6.1.8

Status

addons.mozilla.org Graveyard
Compatibility Tools
P2
major
VERIFIED FIXED
7 years ago
2 years ago

People

(Reporter: jorgev, Assigned: basta)

Tracking

unspecified
6.1.8

Details

(Whiteboard: [fx7])

(Reporter)

Description

7 years ago
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/
(Reporter)

Updated

7 years ago
Assignee: nobody → mbasta
Target Milestone: Q3 2011 → 6.1.7
(Assignee)

Comment 1

7 years ago
Merged:

https://github.com/mozilla/amo-validator/commit/572010cfde71f5728c1adebc4aec0c26387193dc
Status: NEW → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED

Comment 2

7 years ago
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 → ---
(Assignee)

Comment 3

7 years ago
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.

Comment 4

7 years ago
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
(Assignee)

Updated

7 years ago
Status: REOPENED → RESOLVED
Last Resolved: 7 years ago7 years ago
Resolution: --- → FIXED

Comment 5

7 years ago
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.