Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIX] point_of_sale: prevent crashes on older iOS devices
On older iOS devices (like the iPad 2) webkit would crash when clicking on the closing button. Newer devices like the iPad Air 2 and iPad Mini 3 do not exhibit this behavior. This occurs on iOS 9.2.1 but I expect iOS in general is affected by this. This affects both Safari and Chrome as on iOS they both use the same rendering engine. When the POS closes it searches the xml_id containing the action ID, which seems to trigger the webkit crash. So instead we will use the xml_id directly in the URL, that's simpler anyway and it avoids an unnecessary RPC call. Functionally this means you won't get the 'Your internet connection is probably down' message anymore, but it's useless anyway, as after closing the popup the webpage is blocked anyway. A log of the crash can sometimes be seen in the iOS diagnostics logs which indicates com.apple.WebKit.WebContent crashing due to EXC_BAD_ACCESS (SIGSEGV). This log is not always present, but that's not unusual for out of memory issues on iOS [1]. Presumably the segmentation fault is caused by iOS forcefully freeing memory being used by the browser. iOS manages memory in an unusual way. Plenty of developer reports are available online which indicate this [2], but no official documentation from Apple exists that specifies exact memory limit amounts. [1] http://stackoverflow.com/questions/16400431/ios-app-crashes-with-no-error-and-no-crash-report [2] http://stackoverflow.com/questions/16319486/ios-ipad-has-1gb-ram-why-is-my-app-killed-after-using-30mb opw-668268
- Loading branch information