[Webkit-unassigned] [Bug 57090] Simplifying Worker termination sequence (removing unnecessary mutex)
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Mar 29 22:04:11 PDT 2011
https://bugs.webkit.org/show_bug.cgi?id=57090
--- Comment #7 from Dmitry Titov <dimich at chromium.org> 2011-03-29 22:04:11 PST ---
(In reply to comment #6)
> > This will eventually (so no locking needed) propagate to the worker thread and raise termination exception.
>
> Did you check svn history for the lock around m_executionForbidden? I vaguely recall thinking the same when introducing it originally, but then there was a specific race condition that made the lock in WorkerScriptController::evaluate necessary.
I looked, yes. It was created here: http://trac.webkit.org/changeset/38689.
There was originally a timeout of 1ms... Before Terminator.
I think you might needed a mutex to exclude situation when timeout aborted the JS execution, but m_executionForbidden on worker thread is still 'false' - that can happen w/o mutex. So in that case JS could exit by timeout, and immediately enter again.
I think checking the exception result on exit from JS and setting m_executionForbidden on the worker thread achieves the same result, w/o mutex.
Does it match your recollection?
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list