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> {
15011501
15021502 // handle stateful
15031503 if stateful {
1504- task. insert ( CachedDataItem :: Stateful { value : ( ) } ) ;
1504+ let _ = task. add ( CachedDataItem :: Stateful { value : ( ) } ) ;
15051505 }
15061506
15071507 // handle cell counters: update max index and remove cells that are no longer used
@@ -1938,7 +1938,7 @@ impl<B: BackingStorage> TurboTasksBackendInner<B> {
19381938 . entry ( RawVc :: TaskCell ( collectible. task , collectible. cell ) )
19391939 . or_insert ( 0 ) += count;
19401940 }
1941- task. insert ( CachedDataItem :: CollectiblesDependent {
1941+ let _ = task. add ( CachedDataItem :: CollectiblesDependent {
19421942 collectible_type,
19431943 task : reader_id,
19441944 value : ( ) ,
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ use std::{
1414} ;
1515
1616use serde:: { Deserialize , Serialize } ;
17- use turbo_tasks:: { SessionId , TaskId , TurboTasksBackendApi } ;
17+ use turbo_tasks:: { KeyValuePair , SessionId , TaskId , TurboTasksBackendApi } ;
1818
1919use crate :: {
2020 backend:: {
@@ -466,6 +466,9 @@ impl<B: BackingStorage> TaskGuard for TaskGuardImpl<'_, B> {
466466 let category = item. category ( ) ;
467467 self . check_access ( category) ;
468468 if !self . task_id . is_transient ( ) && item. is_persistent ( ) {
469+ if self . task . contains_key ( & item. key ( ) ) {
470+ return false ;
471+ }
469472 self . task . track_modification ( category. into_specific ( ) ) ;
470473 }
471474 self . task . add ( item)
You can’t perform that action at this time.
0 commit comments