<add-linker name="xs"> compiled js files do not work, if compiled "obfuscated", only if compiled "pretty"

244 views
Skip to first unread message

ustakraharez

unread,
Jan 24, 2012, 10:02:39 AM1/24/12
to Google Web Toolkit
Dear All,

We have a problem with xs linker: If we compile our java code with
"pretty" directive, everything works fine, see:

http://www.geogebra.org/web/xs/xsTest.html

But if we compile with the "obfuscated" directive, it don't works,
see:

http://www.geogebra.org/web/test42xs/xsTest.html

It is also strange, that I tried to use the closure-compiler on the
"pretty" compiled js, and it worked, obfuscated the js, and the
browser loaded it without any problem. I tried to debug the problem in
Firefox (firebug), it loads the "long named" permutation, and calls
the "onScriptLoad(gwtOnload) function, but there I'm lost.

The problem persist with Firefox and Chrome too. We use the latest
eclipse plugin (gwt2.4.0)

Thank a lot for your help
Best:
Gabor Ancsin

Colin Alworth

unread,
Jan 24, 2012, 12:07:38 PM1/24/12
to google-we...@googlegroups.com
Compiling in PRETTY also turns off some of the optimizations, so turn them back up again using -optimize 9 in your args. This will hopefully allow you to reproduce the issue, but still see what the code looks like to find where the error is taking place.

See http://code.google.com/webtoolkit/doc/latest/DevGuideCompilingAndDebugging.html#DevGuideCompilerOptions for the full list of args that are possible.

ustakraharez

unread,
Jan 24, 2012, 1:19:26 PM1/24/12
to Google Web Toolkit
Thanks a lot for the quick answer!

I tried with PRETTY and -optimize 9 and also optimize 0. Both of them
worked, and the best optimization gives 5.8Mb file the worst give
6.5Mb so still not 2.5Mb that obfuscation gives. I try to investigate
further tomorrow, thanks for the tip.

On jan. 24, 18:07, Colin Alworth <niloc...@gmail.com> wrote:
> Compiling in PRETTY also turns off some of the optimizations, so turn them
> back up again using -optimize 9 in your args. This will hopefully allow you
> to reproduce the issue, but still see what the code looks like to find
> where the error is taking place.
>
> Seehttp://code.google.com/webtoolkit/doc/latest/DevGuideCompilingAndDebu...

ustakraharez

unread,
Jan 30, 2012, 8:38:17 AM1/30/12
to Google Web Toolkit
Tried from the latest trunk, xs obfuscated still not working... Only
pretty .-)

Best:
Gabor

Thomas Broyer

unread,
Nov 30, 2012, 6:09:37 AM11/30/12
to google-we...@googlegroups.com


On Thursday, November 29, 2012 9:38:53 PM UTC+1, Gasotelo wrote:
I got this problem, it was because we have a browser plugin that inserts javascript with obfuscated names too, so when the GWT calls a function like xf, it was really calling the plugin xf function.

You should try the xsiframe linker instead.
Reply all
Reply to author
Forward
0 new messages