Closed
Bug 819830
Opened 13 years ago
Closed 13 years ago
Comments aren't treated properly
Categories
(addons.mozilla.org Graveyard :: Add-on Builder, defect)
addons.mozilla.org Graveyard
Add-on Builder
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 725657
People
(Reporter: annanfay, Unassigned)
Details
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:17.0) Gecko/20100101 Firefox/17.0
Build ID: 20121129164337
Steps to reproduce:
I commented out a large portion of my main.js code because it was causing "XPI Not Built" errors.
The example that has been simplified.
Example:
var Widget = require("widget").Widget;
exports.main = function() {
/*
[snip]
Components.utils.import("resource://gre/modules/Services.jsm");
[snip]*/
new Widget({
id: "annanfay-widget-1",
label: "My Mozilla Widget",
contentURL: "http://www.mozilla.org/favicon.ico",
});
};
Actual results:
Firstly, no explanation of the cause of the "XPI Not Built" error was given (bug #725657). I found out the code causing it by commenting out more and more code.
Even though the code causing the error was commented out the error persisted. If I totally remove the code then the error doesn't occur.
This works:
var Widget = require("widget").Widget;
exports.main = function() {
new Widget({
id: "annanfay-widget-1",
label: "My Mozilla Widget",
contentURL: "http://www.mozilla.org/favicon.ico",
});
};
I can only assume that comments aren't treated as comments.
Expected results:
Everything within a comment should be completely ignored, no?
It definitely shouldn't be causing serious errors.
Comments are treated as comments, but (as far as I can tell) the script that checks for the restricted "Components" usage doesn't know about comments, since that would require a much more complicated JS parser, so it just checks the plaintext contents of the file.
I'm marking this as a dupe of bug 725657, since that should help in this case as well.
Status: UNCONFIRMED → RESOLVED
Closed: 13 years ago
Resolution: --- → DUPLICATE
Assignee | ||
Updated•11 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
•