Closed Bug 1015370 Opened 10 years ago Closed 10 years ago

Show compatibility warning if an add-on uses __proto__ or setPrototypeOf

Categories

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

defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED
2014-05

People

(Reporter: jorgev, Assigned: mstriemer)

Details

(Whiteboard: [fx30])

Attachments

(1 file)

As explained in bug 948227, using __proto__ or setPrototypeOf to set a prototype is now deprecated. We need to detect any usage of these two and show a warning.

This is a compatibility warning, so the add-on should still be upgraded in this case. It should appear as a warning in regular validations.

Message:

Using __proto__ or setPrototypeOf to set a prototype is now deprecated. You should use Object.create instead. See <LINK> for more information.

Link: https://bugzilla.mozilla.org/show_bug.cgi?id=948227

Affected add-on:

https://addons.mozilla.org/addon/url-link/

Note about milestone: I need these pushed to the validator next week, since the release is only a couple of weeks away. Sorry for the late notice :\
https://github.com/mstriemer/amo-validator/commit/19f9063ac2095bcbccc625067aca2ffa2c6f05bf
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
(In reply to Jorge Villalobos [:jorgev] from comment #0)
> Affected add-on:
> 
> https://addons.mozilla.org/addon/url-link/

The __proto__ line was commented out, so it's not good for testing. This one should work, I think:

https://addons.mozilla.org/addon/back-to-top/
Attached file urllink-modified.xpi
Attach failing addon (modified).
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: