Running tst_QWebPage::infiniteLoopJS() will never exit (testrun timeout is 1h) and unit test executable stops responding. In order to exit the phone has to be rebooted. When running the same test on emulator it will pass. So for some reason javascript execution on HW is not stopped. Implications of this test is , if failing, that any JS code getting stuck or taking long will block the running thread. Test was run on Nokia 5800 Express Music, Qt and QtWebkit built for armv5 urel using RVCT 2.2.
This issue is caused by bug in Open C 1.6 implementation of gettimeofday(). gtod precision seems to vary from min. 1sec to several minutes i.e. calling gtod several times in a row will return the same value. This value is then used in TimeoutChecker getCPUTime() to calculate time spent running the script causing the script never to be interrupted.
Created attachment 49276 [details] proposed fix for timeoutchecker.cpp Patch contains a proper implementation of getCPUTime for Symbian. It works from Symbian 9.1 onwards i.e. S60 3rd edition and up as that is when GetCpuTime function was introduced. Tested the the patch to run on Nokia N95 and Nokia 5800 Express Music. It is possible that some device doesn't implement the function or has it disabled, thus added assertion for debugging purposes to see if some device returns KErrNotSupported. Also reported the gettimeofday -issue to Open C guys, so that will be fixed in future releases.
Attachment 49276 [details] did not pass style-queue: Failed to run "WebKitTools/Scripts/check-webkit-style" exit_code: 1 JavaScriptCore/runtime/TimeoutChecker.cpp:92: Missing space after , [whitespace/comma] [3] Total errors found: 1 in 2 files If any of these errors are false positives, please file a bug against check-webkit-style.
Created attachment 49278 [details] proposed fix for timeoutchecker.cpp style fixed fixed style issue with ,
I changed the title to better reflect what this patch does. Approach looks good to me I think Symbian specific code is justified here.
Comment on attachment 49278 [details] proposed fix for timeoutchecker.cpp style fixed Clearing flags on attachment: 49278 Committed r55296: <http://trac.webkit.org/changeset/55296>
All reviewed patches have been landed. Closing bug.