Timeout Javascript thread after 10 seconds

[#59251548]