Changeset 164089 in webkit
- Timestamp:
- Feb 13, 2014 6:42:10 PM (10 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/API/JSValue.mm
r164085 r164089 616 616 { 617 617 JSC::ExecState* exec = toJS(m_context); 618 m_jsValues.append(JSC::Strong<JSC::Unknown>(exec->vm(), toJS (exec, task.js)));618 m_jsValues.append(JSC::Strong<JSC::Unknown>(exec->vm(), toJSForGC(exec, task.js))); 619 619 m_objectMap.add(task.js, task.objc); 620 620 if (task.type != ContainerNone) … … 673 673 { 674 674 ASSERT(task.type != ContainerNone); 675 JSC::APIEntryShim entryShim(toJS(context)); 675 676 JSContainerConvertor convertor(context); 676 677 convertor.add(task); … … 842 843 { 843 844 JSC::ExecState* exec = toJS(m_context.JSGlobalContextRef); 844 m_jsValues.append(JSC::Strong<JSC::Unknown>(exec->vm(), toJS (exec, task.js)));845 m_jsValues.append(JSC::Strong<JSC::Unknown>(exec->vm(), toJSForGC(exec, task.js))); 845 846 m_objectMap.add(task.objc, task.js); 846 847 if (task.type != ContainerNone) … … 922 923 return task.js; 923 924 925 JSC::APIEntryShim entryShim(toJS(contextRef)); 924 926 ObjcContainerConvertor convertor(context); 925 927 convertor.add(task); -
trunk/Source/JavaScriptCore/ChangeLog
r164088 r164089 1 2014-02-13 Mark Lam <mark.lam@apple.com> 2 3 The JSContainerConvertor and ObjcContainerConvertor need to protect JSValueRefs. Part 2. 4 <https://webkit.org/b/128764> 5 6 Reviewed by Mark Hahnenberg. 7 8 toJS() is the wrong cast function to use. We need to use toJSForGC() instead. 9 Also we need to acquire the JSLock to prevent concurrent accesses to the 10 Strong handle list. 11 12 * API/JSValue.mm: 13 (JSContainerConvertor::add): 14 (containerValueToObject): 15 (ObjcContainerConvertor::add): 16 (objectToValue): 17 1 18 2014-02-13 Mark Hahnenberg <mhahnenberg@apple.com> 2 19
Note: See TracChangeset
for help on using the changeset viewer.