> This is a bit old, but in the interest of linking information here's a 
> blog post I found on this issue with another workaround: 
> http://deploythoughts.blogspot.com/2012/11/gwt-webapp-and-ios-6-safari.html. 
> That workaround did the trick for us.
>

I don't think thats a good workaround. You can still have issues in your 
app that you probably haven't noticed yet. Last time I looked at GWT JS 
code ClassCastExceptions are emulated by looking at a map which has stored 
information if class A can be treated/cast to class B. If this map lookup 
fails a ClassCastException is thrown. This lookup may fail because you 
really should not cast the two classes or it can fail because the 
information is available in the map (=you are allowed to cast) but could 
not be retrieved because of some other weird iOS Safari issues

One of these weird iOS Safari issues is a JS JIT compiler issue in WebKit's 
Nitro JS engine described at 

http://stackoverflow.com/questions/13147026/disabling-jit-in-safari-6-to-workaround-severe-javascript-jit-bugs

This bug has been reported to WebKit and is already fixed in WebKit 
nightly. The issue was that a++ and a-- did not work as expected when JIT 
compilation is active. The stackoverflow article also has a jsfiddle that 
you can try yourself in Safari. This issue can break everything pretty 
randomly, so disabling class cast checking in GWT may avoid your current 
issues but you can be pretty sure that things can still randomly fail in 
your app. Also note that its not just an iOS Safari issue. It also happens 
on Mac OS Desktop Safari versions.

The reason why the issue disappears when you connect to Safari via 
Development console is that JIT compilation is then automatically disabled. 

What we have done is to disable JIT compilation for WebKit based browsers 
entirely by wrapping every method in a try/catch block which disables JIT 
compilation for this method (as described in the stackoverflow article). Of 
course its a performance hit but at least in our app its not noticeable. We 
also tried rewriting a++ and a-- in the final JS code but that does not 
solve every issue for us. For more information you can take a look 
at: 
https://groups.google.com/forum/?fromgroups=#!topic/google-web-toolkit-contributors/O8JFu_D8Gjc

-- J.




-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to