Closed
Bug 635450
Opened 13 years ago
Closed 13 years ago
Validator does not flag errors in for loop bodies.
Categories
(addons.mozilla.org Graveyard :: Admin/Editor Tools, defect)
addons.mozilla.org Graveyard
Admin/Editor Tools
Tracking
(Not tracked)
RESOLVED
FIXED
5.12.12
People
(Reporter: kmag, Assigned: basta)
Details
Attachments
(1 file)
1.91 KB,
application/zip
|
Details |
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:2.0b12pre) Gecko/20110216 Firefox/4.0b12pre Build Identifier: It seems that for loop bodies are entirely ignored by the JavaScript validator. While and do-while loops are unaffected. The attached XPI contains the following code fragments, and while the errors in the former set are flagged, those in the latter set are not: eval("foo"); setTimeout("foo"); document.createElement("script"); netscape.security.PrivilegeManager.enablePrivilege("UniversalXPCOM"); for (var i=0; i < 1; i++) { eval("foo"); setTimeout("foo"); document.createElement("script"); netscape.security.PrivilegeManager.enablePrivilege("UniversalXPCOM"); } Reproducible: Always
Reporter | ||
Comment 1•13 years ago
|
||
Updated•13 years ago
|
Assignee: nobody → mbasta
Target Milestone: --- → 5.12.12
Assignee | ||
Comment 2•13 years ago
|
||
This might be because the interface for ForStatement nodes changed. Are you running your tests locally? If so, what build of Spidermonkey are you on? I'll go ahead and check the docs.
Assignee | ||
Comment 3•13 years ago
|
||
Yup, ForStatement has a "body" element. Updated. https://github.com/mattbasta/amo-validator/commit/e5c5f798bfa17b17b73189eec43ef7dd39f6b03f
Status: UNCONFIRMED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Updated•8 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
•