mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-22 23:27:30 +09:00
Fix possible data race while updating scope object during compacting GC.
This commit is contained in:
parent
becadd3588
commit
c0871c52e1
1 changed files with 8 additions and 3 deletions
|
|
@ -2310,22 +2310,27 @@ GCRuntime::updateCellPointers(MovingTracer* trc, Zone* zone, AllocKinds kinds, s
|
||||||
// 2) typed object type descriptor objects
|
// 2) typed object type descriptor objects
|
||||||
// 3) all other objects
|
// 3) all other objects
|
||||||
//
|
//
|
||||||
|
// Also, there can be data races calling IsForwarded() on the new location of a
|
||||||
|
// cell that is being updated in parallel on another thread. This can be avoided
|
||||||
|
// by updating some kinds of cells in different phases. This is done for JSScripts
|
||||||
|
// and LazyScripts, and JSScripts and Scopes.
|
||||||
|
//
|
||||||
// Since we want to minimize the number of phases, we put everything else into
|
// Since we want to minimize the number of phases, we put everything else into
|
||||||
// the first phase and label it the 'misc' phase.
|
// the first phase and label it the 'misc' phase.
|
||||||
|
|
||||||
static const AllocKinds UpdatePhaseMisc {
|
static const AllocKinds UpdatePhaseMisc {
|
||||||
AllocKind::SCRIPT,
|
AllocKind::SCRIPT,
|
||||||
AllocKind::LAZY_SCRIPT,
|
|
||||||
AllocKind::BASE_SHAPE,
|
AllocKind::BASE_SHAPE,
|
||||||
AllocKind::SHAPE,
|
AllocKind::SHAPE,
|
||||||
AllocKind::ACCESSOR_SHAPE,
|
AllocKind::ACCESSOR_SHAPE,
|
||||||
AllocKind::OBJECT_GROUP,
|
AllocKind::OBJECT_GROUP,
|
||||||
AllocKind::STRING,
|
AllocKind::STRING,
|
||||||
AllocKind::JITCODE,
|
AllocKind::JITCODE
|
||||||
AllocKind::SCOPE
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static const AllocKinds UpdatePhaseObjects {
|
static const AllocKinds UpdatePhaseObjects {
|
||||||
|
AllocKind::LAZY_SCRIPT,
|
||||||
|
AllocKind::SCOPE,
|
||||||
AllocKind::FUNCTION,
|
AllocKind::FUNCTION,
|
||||||
AllocKind::FUNCTION_EXTENDED,
|
AllocKind::FUNCTION_EXTENDED,
|
||||||
AllocKind::OBJECT0,
|
AllocKind::OBJECT0,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue