简体   繁体   中英

GWT: JavaScript error with opera

We have a large GWT app. Since some days we've got a strange error in opera, all other browser are fine:

Syntax error at line 3739 while loading:
f+Gcd(ead)+LIf+A9c.b.b+RIf+Icd(ead)+LIf+
--------------------^
input too deeply nested

I've google for "input too deeply nested" but can't find anything related to our problem. Its hard to debug cause there you cant run the app in development mode, but only with compiled JavaScript.

Carakan's parser is a fairly simple recursive-decent one. As such, to avoid blowing the stack, there's a depth limit on input tokens. Nested "+" expressions can cause it, though there is some protection against that (though I forget exactly what, will check and edit this later).

Very late response, but possibly helpful for other users?

Opera (or Opera Mini in our case) can still choke on deeply nested expressions. Minification tools such as Google's Closure Compiler or UglifyJS will recompile Javascript source code and can introduce much more complex (and deeper) expressions than the original source would suggest.

For Uglifier in Ruby on Rails 4, turning off compress.sequences is usually enough to fix the problem. In config/environments/production.rb :

config.assets.js_compressor = Uglifier.new(:compress => {:sequences => false})

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM