Ensure all JS in m-c is parseable

RESOLVED FIXED in Firefox 39

Status

()

defect
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: billm, Assigned: billm)

Tracking

34 Branch
Firefox 39
x86_64
Linux
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox39 fixed)

Details

Attachments

(3 attachments)

I would like to be able to parse all .js and .jsm files in the tree. The patches in here make that happen.
The way we were using the preprocessor in these two files (with comments interleaved) was messing up my broken preprocessing code. This patch switches these two cases to use AppConstants.
Attachment #8580325 - Flags: review?(gavin.sharp)
This code must be unused or something. It's not syntactically correct. This patch fixes it.
Attachment #8580326 - Flags: review?(gavin.sharp)
Having the executable bit set on these JS files is screwing up my heuristics for finding JS code. There's no reason for these files to be executable, so I think we should turn it off.

Fabrice, can you "review" the DOM changes and Gavin the rest?
Attachment #8580328 - Flags: review?(gavin.sharp)
Attachment #8580328 - Flags: review?(fabrice)
Comment on attachment 8580328 [details] [diff] [review]
Remove executable permission from some js files

Not sure how that happened in the first place!
Attachment #8580328 - Flags: review?(fabrice) → review+
Attachment #8580328 - Flags: review?(gavin.sharp) → review+
Comment on attachment 8580326 [details] [diff] [review]
Fix code that is broken or unused

Can you file a bug on removing CRH_DIALOG_TREE_VIEW-related code?
Attachment #8580326 - Flags: review?(gavin.sharp) → review+
Attachment #8580325 - Flags: review?(gavin.sharp) → review+
Oh, looks like there are a bunch of other #ifdefs in applications.js...
Oops. These files are actually pretty hard cases for eliminating the preprocessor since they use #expand and HAVE_SHELL_SERVICE (not sure what that is). I'll re-land when I can but leave the * annotations in the jar.mn files.
HAVE_SHELL_SERVICE is basically trying to exclude MOZ_WIDGET_QT (and maybe OS2 and other non-supported things), so AppConstants.platform won't quite work. We might be able to just get rid of it entirely.

For the #expands its easy enough to add MOZ_APP_NAME and MOZ_MACBUNDLE_NAME to AppConstants.
(Don't need to chase those in this bug, certainly.)
I accidentally clobbered the addon-sdk part of this when I landed bug 1146943 today so relanded as https://hg.mozilla.org/integration/fx-team/rev/692ec0a78180.
https://hg.mozilla.org/mozilla-central/rev/72859482261b
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 39
You need to log in before you can comment on or make changes to this bug.