DRT's setAudioResultCallback() and IDBRequest::setResult() need to acquire the JSLock.
authormark.lam@apple.com <mark.lam@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 5 May 2017 16:14:49 +0000 (16:14 +0000)
committermark.lam@apple.com <mark.lam@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 5 May 2017 16:14:49 +0000 (16:14 +0000)
commit6b5cf27307e85cf815a532f58d0bbf4a02e7e74b
treedcff787d25c3fbefeb4db8e81477f5449582db9d
parenteba48a49a72e8247544b7275e364a3af48b2b824
DRT's setAudioResultCallback() and IDBRequest::setResult() need to acquire the JSLock.
https://bugs.webkit.org/show_bug.cgi?id=171716
<rdar://problem/30878027>

Reviewed by Saam Barati.

Source/WebCore:

No new tests.  This issue was caught by existing tests.

IDBRequest::setResult() needs to acquire the JSLock before calling toJS() (which
does JS conversion and therefore, potentially JS allocations).

* Modules/indexeddb/IDBRequest.cpp:
(WebCore::IDBRequest::setResult):
(WebCore::IDBRequest::setResultToStructuredClone):

Tools:

setAudioResultCallback() needs to acquire the JSLock before calling toJS() (which
does JS conversion and therefore, potentially JS allocations) and accessing
methods of internal JS data structures (which may do JS invocation, etc).

* DumpRenderTree/TestRunner.cpp:
(setAudioResultCallback):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@216246 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/Modules/indexeddb/IDBRequest.cpp
Tools/ChangeLog
Tools/DumpRenderTree/TestRunner.cpp