Closed
Bug 741518
Opened 14 years ago
Closed 13 years ago
validator doesn't ignore comments
Categories
(addons.mozilla.org Graveyard :: Add-on Validation, defect)
addons.mozilla.org Graveyard
Add-on Validation
Tracking
(Not tracked)
RESOLVED
WORKSFORME
People
(Reporter: mah, Unassigned)
Details
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:12.0) Gecko/20100101 Firefox/12.0
Build ID: 20120322123906
Steps to reproduce:
Uploaded an xpi with a commented-out line in the source: https://addons.mozilla.org/en-US/developers/upload/b4f73736e6d844d4bd4de6d1c49e150b
Actual results:
It gave me a warning and pointed to two lines of code:
Usage of non-SDK interface
Warning: This SDK-based add-on uses interfaces that aren't part of the SDK.
resources/cite4wiki2/lib/main.js
// const {Cc,Ci} = require("chrome");
const tabs = require("tabs");
Eliminating the commented-out line fixed the error.
Expected results:
It should have ignored the commented out line and given results similar to this:
https://addons.mozilla.org/en-US/developers/upload/b2cbb351a69a4fc5b89da14301071700
Comment 1•13 years ago
|
||
Can you attach the XPI that's causing this issue? It sounds like you've got a weird encoding on your file that's causing the comments to be ignored.
For all intents and purposes, the validator itself doesn't parse the JS; it's farmed out to Spidermonkey. If this is indeed a case where there is a parser bug, it's a bug in Spidermonkey rather than a bug in the validator.
Comment 2•13 years ago
|
||
I can't reproduce this issue. If it's seen again in the future, please reopen this bug and attach the XPI directly.
Status: UNCONFIRMED → RESOLVED
Closed: 13 years ago
Resolution: --- → WORKSFORME
Comment 3•11 years ago
|
||
I am hitting this problem too. It's tripping on
// RegExp.prototype.test = (on ? fixed : nativ).test;
with the message
Warning: It appears that an extension of a built-in JS type was made. This is not allowed for security and compatibility reasons.
| Assignee | ||
Updated•10 years ago
|
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•