Joshua Cranmer wrote:
JSHydra is actually just a standalone executable that needs the
SpiderMonkey source to compile properly (I'm using internal APIs).
It's possible that I could make it work as a Firefox extension, but
it's a low priority at this point.
Fair enough; better to have the functionality first than to figure out
exactly where to surface it...
The use case I'm considering is something like: I'm writing a tool at
the moment (as an extension to Firefox, though it could be XULRunner
or whatever; I've been using extensions so I could familiarize myself
with how they work in practice) which reads a .xpi, parses the css,
xul, and hopefully js files, and does stuff (stuff == TBD...) to
them. I'm trying to do this within Firefox for the same reason you
used SpiderMonkey internal APIs -- for 100% accuracy compared to
Firefox. I had tried using Brendan Eich's Narcissus, but it's out of
date and doesn't parse the latest additions to JS... Might JSHydra
be the tool I'm looking for instead, and if so how do I invoke and
use it?
That's the reason I didn't use Narcissus: I figured the actual, real
APIs would be more accurate.
In terms of support, jshydra is definitely not there yet. The support
for looking at multiple JS files at once is non-existent (it is a
goal, though), and I'm working on some general utility scripts to make
the ASTs a bit friendlier as I have time.
That's less of a concern at the moment; as long as I can repeatedly
invoke JShydra and get standalone ASTs, that should be enough to get me
started. I'm not actually installing a .xpi as an extension, rather,
just unzipping it and sequentially processing the files inside.
FWIW, I'm not sure how much help I can be writing the code, but I'll be
happy to try help debug it :)
~ben
_______________________________________________
dev-static-analysis mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-static-analysis