Uncaught TypeError when viewing GWT pages in Google Chrome Frame

157 views
Skip to first unread message

Estelito D. Reyes III

unread,
Oct 9, 2009, 3:00:18 AM10/9/09
to Google Web Toolkit
Hi list,

We are using GWT 1.5.3 and just started testing our app in the Google
Chrome Frame.

Has anyone else encountered this bug, wherein the generated javascript
we have for our project contains the function named top() and when
viewed in Google Chrome Frame, the page never loads and in the console
the following error is seen:

Uncaught :longfilenameandlocationofgeneratedjs.cache.html: 2
TypeError: const 'top' has already been declared

Anyone got an idea how to solve this? Can I somehow make the
GWTCompiler not to use 'top' as a function name?

I can try and compile it again hoping the name 'top' doesn't get used
in the generated javascript but that's just meh because we frequently
compile the project.

Also looking at not using OBF mode but that would blow up the size of
the generated javascript.

To try and recreate the issue you can edit a jsp file and add the
following to the <head> section:

<script>var $gwt_version = "1.5.3";var $wnd = parent;var $doc =
$wnd.document;var $moduleName, $moduleBase;var $stats =
$wnd.__gwtStatsEvent ? function(a) {return $wnd.__gwtStatsEvent(a);} :
null;$stats && $stats
({moduleName:'com.premia.web.gwt.module.claims.Main',subSystem:'startup',evtGroup:'moduleStartup',millis:
(new Date()).getTime(),type:'moduleEvalStart'});</script>

<script type="text/javascript"><!--

function top(){
}

--></script>


Do I just post this here or inform the google chrome frame group as
well?

Thanks in advance,
Estelito

Estelito D. Reyes III

unread,
Oct 19, 2009, 5:44:36 AM10/19/09
to Google Web Toolkit
For anyone encountering the same issue:

http://code.google.com/p/chromium/issues/detail?id=24408

In summary, don't use top() in your javascript, it's being used by
google chrome frame somehow.

On Oct 9, 3:00 pm, "Estelito D. Reyes III" <baliwe...@gmail.com>
wrote:
Reply all
Reply to author
Forward
0 new messages