Hallvord R. M. Steen wrote:
> On Fri, 26 Sep 2008 19:58:27 +0200, liorean <[EMAIL PROTECTED]> wrote:
>
> > 2008/9/26 Erik Arvidsson <[EMAIL PROTECTED]>:
> >> I know that Opera on mobile phones used to return a string
> >> representation that did not reflect the original.
> >
> > Yeah. Opera Mobile returned "[ECMAScript code]" or "[ecmascript
> > code]". This was contrary to the ES3 spec (must be parsable as a
> > function definition, IIRC) and also breaks the eval roundtripping by
> > throwing a parse error.
> > Anybody know if those issues have been fixed in more modern versions?
>
> No, not consistently across "modern versions". It's not likely to be  
> properly "fixed" for a while yet. The reason is that on many platforms  
> where memory is scarce, not enabling JS decompilation helps reduce memory  
> requirements.
>   

Do you keep the original source code of the whole script in memory, or
at least somewhere cached? If so, you could store offsets to the
function's source within memory/cache in defined functions, and get the
function source as a string on demand. It would be slow, but it would
fix compatibility, and I hardly think the speed of a relatively
little-used feature matters for mobile.
_______________________________________________
Es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to