Changeset 259602 in webkit
- Timestamp:
- Apr 6, 2020, 4:05:18 PM (6 years ago)
- Location:
- branches/safari-609-branch/Source/JavaScriptCore
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
dfg/DFGPlan.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/safari-609-branch/Source/JavaScriptCore/ChangeLog
r259600 r259602 1 2020-04-06 Alan Coon <alancoon@apple.com> 2 3 Cherry-pick r259424. rdar://problem/61352472 4 5 [JSC] RecordedStatuses's assignment should be guarded by CodeBlock's lock 6 https://bugs.webkit.org/show_bug.cgi?id=209935 7 <rdar://problem/59443383> 8 9 Reviewed by Mark Lam. 10 11 Previously RecordedStatuses are not touched by GC. But now, GC visits RecordedStatuses. 12 This means that modifying RecordedStatuses should be guarded by CodeBlock's lock if 13 it is reachable from CodeBlock. 14 In DFG::Plan::reallyAdd, we already installed DFG::JITCode into the CodeBlock so that 15 RecordedStatuses is reachable from CodeBlock. We should lock CodeBlock's lock while 16 performing `WTFMove(RecordedStatuses)`. 17 18 We do not need to emit write-barrier here because (1) DFG::Plan::reallyAdd is executed 19 while GC is deferred and (2) we emit write-barrier to CodeBlock before deferred GC is executed. 20 21 * dfg/DFGPlan.cpp: 22 (JSC::DFG::Plan::reallyAdd): 23 24 git-svn-id: https://svn.webkit.org/repository/webkit/trunk@259424 268f45cc-cd09-0410-ab3c-d52691b4dbfc 25 26 2020-04-02 Yusuke Suzuki <ysuzuki@apple.com> 27 28 [JSC] RecordedStatuses's assignment should be guarded by CodeBlock's lock 29 https://bugs.webkit.org/show_bug.cgi?id=209935 30 <rdar://problem/59443383> 31 32 Reviewed by Mark Lam. 33 34 Previously RecordedStatuses are not touched by GC. But now, GC visits RecordedStatuses. 35 This means that modifying RecordedStatuses should be guarded by CodeBlock's lock if 36 it is reachable from CodeBlock. 37 In DFG::Plan::reallyAdd, we already installed DFG::JITCode into the CodeBlock so that 38 RecordedStatuses is reachable from CodeBlock. We should lock CodeBlock's lock while 39 performing `WTFMove(RecordedStatuses)`. 40 41 We do not need to emit write-barrier here because (1) DFG::Plan::reallyAdd is executed 42 while GC is deferred and (2) we emit write-barrier to CodeBlock before deferred GC is executed. 43 44 * dfg/DFGPlan.cpp: 45 (JSC::DFG::Plan::reallyAdd): 46 1 47 2020-04-06 Alan Coon <alancoon@apple.com> 2 48 -
branches/safari-609-branch/Source/JavaScriptCore/dfg/DFGPlan.cpp
r258156 r259602 559 559 void Plan::reallyAdd(CommonData* commonData) 560 560 { 561 ASSERT(m_vm->heap.isDeferred()); 561 562 m_watchpoints.reallyAdd(m_codeBlock, *commonData); 562 563 m_identifiers.reallyAdd(*m_vm, commonData); … … 564 565 m_transitions.reallyAdd(*m_vm, commonData); 565 566 m_globalProperties.reallyAdd(m_codeBlock, m_identifiers, *commonData); 566 commonData->recordedStatuses = WTFMove(m_recordedStatuses); 567 { 568 ConcurrentJSLocker locker(m_codeBlock->m_lock); 569 commonData->recordedStatuses = WTFMove(m_recordedStatuses); 570 } 567 571 } 568 572
Note:
See TracChangeset
for help on using the changeset viewer.