You need to
before you can comment on or make changes to this bug.
function.toString does not work right after calling the function. This breaks at least the following layout tests:
On IRC, Maciej said he was working on this.
Created an attachment (id=21056) [details]
fix by keeping references to the original source
(From update of attachment 21056 [details])
r=me, although i am concerned about this approach in the long term. As we are no longer actually decompiling there are two side effects:
* It is no longer possible to use function.toString to "prettify" source which makes debugging google, etc difficult (for us), and there are a number of places i've seen on the web that reference decompilation as a way to reformat JS.
* This renders a number of fuzzers somewhat useless. JSFunFuzz for instance does roundtrip checks which in general are meant to pick up times when we have compiled code that does one thing into an incorrect form, which we now lose as all we do is regurgitate what we were given.
That said if we start doing significant optimisations and restructuring with the bytecode stream decopmilation may not be entirely helpful.