[Webkit-unassigned] [Bug 141221] New: Remove concept of makeUsableFromMultipleThreads()
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Feb 3 17:08:57 PST 2015
https://bugs.webkit.org/show_bug.cgi?id=141221
Bug ID: 141221
Summary: Remove concept of makeUsableFromMultipleThreads()
Classification: Unclassified
Product: WebKit
Version: 528+ (Nightly build)
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: JavaScriptCore
Assignee: webkit-unassigned at lists.webkit.org
Reporter: mark.lam at apple.com
Currently, we rely on VM::makeUsableFromMultipleThreads() being called before we start entering the VM (which means acquiring the JSLock) from different threads. Acquisition of the JSLock will register the acquiring thread to the VM's thread registry if not added. However, it will only do this if the VM's thread specific key has been initialized by makeUsableFromMultipleThreads().
This is fragile and also does not read intuitively because one would expect to acquire the JSLock before calling any methods on the VM. This exactly what JSGlobalContextCreateInGroup() did (acquire the lock before calling makeUsableFromMultipleThreads()), but is wrong. The result is that the invoking thread will not have been registered with the VM during that first entry into the VM.
The fix is to make it so that we initialize the VM's thread specific key on construction of the VM's MachineThreads registry instead of relying on makeUsableFromMultipleThreads() being called. With this, we can eliminate makeUsableFromMultipleThreads() altogether.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20150204/c47a5406/attachment-0002.html>
More information about the webkit-unassigned
mailing list