Changeset 259424 in webkit
- Timestamp:
- Apr 2, 2020, 4:22:55 PM (6 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
dfg/DFGPlan.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r259418 r259424 1 2020-04-02 Yusuke Suzuki <ysuzuki@apple.com> 2 3 [JSC] RecordedStatuses's assignment should be guarded by CodeBlock's lock 4 https://bugs.webkit.org/show_bug.cgi?id=209935 5 <rdar://problem/59443383> 6 7 Reviewed by Mark Lam. 8 9 Previously RecordedStatuses are not touched by GC. But now, GC visits RecordedStatuses. 10 This means that modifying RecordedStatuses should be guarded by CodeBlock's lock if 11 it is reachable from CodeBlock. 12 In DFG::Plan::reallyAdd, we already installed DFG::JITCode into the CodeBlock so that 13 RecordedStatuses is reachable from CodeBlock. We should lock CodeBlock's lock while 14 performing `WTFMove(RecordedStatuses)`. 15 16 We do not need to emit write-barrier here because (1) DFG::Plan::reallyAdd is executed 17 while GC is deferred and (2) we emit write-barrier to CodeBlock before deferred GC is executed. 18 19 * dfg/DFGPlan.cpp: 20 (JSC::DFG::Plan::reallyAdd): 21 1 22 2020-04-02 Mark Lam <mark.lam@apple.com> 2 23 -
trunk/Source/JavaScriptCore/dfg/DFGPlan.cpp
r256015 r259424 570 570 void Plan::reallyAdd(CommonData* commonData) 571 571 { 572 ASSERT(m_vm->heap.isDeferred()); 572 573 m_watchpoints.reallyAdd(m_codeBlock, *commonData); 573 574 m_identifiers.reallyAdd(*m_vm, commonData); … … 575 576 m_transitions.reallyAdd(*m_vm, commonData); 576 577 m_globalProperties.reallyAdd(m_codeBlock, m_identifiers, *commonData); 577 commonData->recordedStatuses = WTFMove(m_recordedStatuses); 578 { 579 ConcurrentJSLocker locker(m_codeBlock->m_lock); 580 commonData->recordedStatuses = WTFMove(m_recordedStatuses); 581 } 578 582 } 579 583
Note:
See TracChangeset
for help on using the changeset viewer.