Click here to Skip to main content
14,695,617 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
I am having the chromium source code running successfully on my PC,I need to prevent the unresponsive script which causes the blocking of UI thread.How can I make it possible ?
Posted
Updated 2-May-15 1:26am
v2
Comments
Richard MacCutchan 2-May-15 5:12am
   
Probably by fixing the code that is in error.

1 solution

The question, as formulated, makes no sense. Perhaps this is not what you meant to say.

It's not that unresponsive script is caused by the blocking of UI thread. It's UI thread can be blocked by unresponsive script. And then isn't it obvious that unresponsive script should remain unresponsive, because this is the obligation of the script host to execute exactly the script loaded by the page, and not any other script?

As to the survival of the application threads and, hence, the application itself, this is the matter of the browser design itself. The thread could be terminated, say, based on timeout, removed and recreated again, after showing error. This kind of thread programming is pretty difficult because you have to perform the clean-up ("post-mortal" clean-up) of the resources allocated by thread, but some of these resources could be in half-allocated state, which could be related to your script behavior your host code would be agnostic to. I'm not ready to discuss this difficult problem completely seriously in a Quick Answer…

[EDIT]

Out of curiosity, I just tested handling unresponsive script on Mozilla and Chrome (based on the same engine as Chromium) — as I expected, both provide such timeout mechanism with giving the user the choice to continue waiting. Before, I knew that it worked that way on Mozilla. I don't think you have serious reasons to complain.

—SA
   
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900