The JSContainerConvertor and ObjcContainerConvertor need to protect JSValueRefs....
authormark.lam@apple.com <mark.lam@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 14 Feb 2014 02:42:10 +0000 (02:42 +0000)
committermark.lam@apple.com <mark.lam@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 14 Feb 2014 02:42:10 +0000 (02:42 +0000)
commit34897c4c15e6d43c875a3dfb0071917f4fc12429
treeb43b86b16498cf05fc29675d52d1f8a6f2910e7d
parent0f27e785401aa9caad22c98a632b91d42f720cfb
The JSContainerConvertor and ObjcContainerConvertor need to protect JSValueRefs. Part 2.
<https://webkit.org/b/128764>

Reviewed by Mark Hahnenberg.

toJS() is the wrong cast function to use. We need to use toJSForGC() instead.
Also we need to acquire the JSLock to prevent concurrent accesses to the
Strong handle list.

* API/JSValue.mm:
(JSContainerConvertor::add):
(containerValueToObject):
(ObjcContainerConvertor::add):
(objectToValue):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@164089 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore/API/JSValue.mm
Source/JavaScriptCore/ChangeLog