File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
turbopack/crates/turbo-tasks-backend/src/backend Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -1501,7 +1501,7 @@ impl<B: BackingStorage> TurboTasksBackendInner<B> {
1501
1501
1502
1502
// handle stateful
1503
1503
if stateful {
1504
- task. insert ( CachedDataItem :: Stateful { value : ( ) } ) ;
1504
+ let _ = task. add ( CachedDataItem :: Stateful { value : ( ) } ) ;
1505
1505
}
1506
1506
1507
1507
// handle cell counters: update max index and remove cells that are no longer used
@@ -1938,7 +1938,7 @@ impl<B: BackingStorage> TurboTasksBackendInner<B> {
1938
1938
. entry ( RawVc :: TaskCell ( collectible. task , collectible. cell ) )
1939
1939
. or_insert ( 0 ) += count;
1940
1940
}
1941
- task. insert ( CachedDataItem :: CollectiblesDependent {
1941
+ let _ = task. add ( CachedDataItem :: CollectiblesDependent {
1942
1942
collectible_type,
1943
1943
task : reader_id,
1944
1944
value : ( ) ,
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ use std::{
14
14
} ;
15
15
16
16
use serde:: { Deserialize , Serialize } ;
17
- use turbo_tasks:: { SessionId , TaskId , TurboTasksBackendApi } ;
17
+ use turbo_tasks:: { KeyValuePair , SessionId , TaskId , TurboTasksBackendApi } ;
18
18
19
19
use crate :: {
20
20
backend:: {
@@ -466,6 +466,9 @@ impl<B: BackingStorage> TaskGuard for TaskGuardImpl<'_, B> {
466
466
let category = item. category ( ) ;
467
467
self . check_access ( category) ;
468
468
if !self . task_id . is_transient ( ) && item. is_persistent ( ) {
469
+ if self . task . contains_key ( & item. key ( ) ) {
470
+ return false ;
471
+ }
469
472
self . task . track_modification ( category. into_specific ( ) ) ;
470
473
}
471
474
self . task . add ( item)
You can’t perform that action at this time.
0 commit comments