Bug 23459

Summary: Workers are not properly terminated if execution hasn't begun yet
Product: WebKit Reporter: Alexey Proskuryakov <ap>
Component: WebCore Misc.Assignee: Alexey Proskuryakov <ap>
Status: RESOLVED FIXED    
Severity: Normal    
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
proposed patch
darin: review+
Alternative patch oliver: review+

Alexey Proskuryakov
Reported 2009-01-21 12:01:25 PST
If Worker.terminate() is called before the worker thread has begun execution, it cannot forbid script execution. So, evaluating the script source can result in the thread entering a loop forever, taking 100% of processor (core) time.
Attachments
proposed patch (1.53 KB, patch)
2009-01-21 12:04 PST, Alexey Proskuryakov
darin: review+
Alternative patch (1.48 KB, patch)
2009-01-22 00:27 PST, Alexey Proskuryakov
oliver: review+
Alexey Proskuryakov
Comment 1 2009-01-21 12:04:20 PST
Created attachment 26900 [details] proposed patch
Darin Adler
Comment 2 2009-01-21 13:46:11 PST
Comment on attachment 26900 [details] proposed patch r=me
Alexey Proskuryakov
Comment 3 2009-01-22 00:27:04 PST
Created attachment 26924 [details] Alternative patch I changed my mind - I now think it's better to go through the normal code path, to avoid getting out of sync in the future. It's slightly less efficient, but this use case is definitely not something to optimize for.
Alexey Proskuryakov
Comment 4 2009-01-23 06:51:15 PST
Committed revision 40159.
Note You need to log in before you can comment on or make changes to this bug.