Hi,
I just wanted to start a discussion on all the WebKit issues that appeared after the release of Safari 6 / iOS 6. To get an impression here are some links I found so far:
GWT Group:
Vaadin:
Stackoverflow:
The GWT groups discussions are mainly dealing with random app crashes caused by ClassCastExceptions. Often variables of type HashMap<String, ?> are involved. Problems with HashMaps containing String keys are also reported to Vaadin.
The last bold link is the one I am stumbled upon yesterday and its pretty interesting. It states that WebKit's JIT compiler has some serious bugs and it also contains a working proof of concept demonstrating an issue where var++ and var-- do not work correctly when JIT is active.
This happens on iOS 6 devices, WebKit nightly builds, Safari 6 in Mac OS 10.7 and 10.8. So I would guess in most or even all WebKit based browsers that have JIT enabled.
As soon as you connect to an iOS device using Safari for remote debugging or when you open the Safari DevTools on Mac OS the issues disappear. I would assume that WebKit simply disables JIT as soon as a debugger runs and thats why all issues disappear magically. This would also explain why Google Chrome for iOS does not suffer from these issues because I think only Safari has access to the JIT compiler on iOS for security reasons.
Currently as soon as a customer uses Safari/WebKit (maybe except Chrome because of V8) to access a GWT app it is not guaranteed to work. We just tested it with our application on Mac OS 10.7 / 10.8 Safari 6 and discovered that it indeed has strange random behavior if you only try it often enough. In our case for example we have a Map and containsKey with a String key randomly stops working which results in wrong information shown in the UI. So before today we were under the impression that its an iOS bug only (which is still present in iOS 6.1) but it seems like its more wide spread.
So whats your opinion on this? Should GWT try to workaround these issues somehow? On Stackoverflow a suggested workaround is to disable JIT for a given method by wrapping the methods content in a try catch block that re-throws possible exceptions. Would it be possible to introduce a flag to GWT that enables such specific "hacks" for Safari permutations? As it sounds like that JIT compilation is the main issue its maybe worth it to give it a try?
Do you guys at Google know these issues and working on it? Don't you have problems with your own GWT apps?
Currently we have to tell customers to not use Safari at all and use Chrome app on iOS devices. The whole situation is somewhat frustrating.
-- J.