@@ -172,6 +172,7 @@ pub trait TurboTasksApi: TurboTasksCallApi + Sync + Send {
172172 task : TaskId ,
173173 index : CellId ,
174174 is_serializable_cell_content : bool ,
175+ is_session_stateful : bool ,
175176 content : CellContent ,
176177 updated_key_hashes : Option < SmallVec < [ u64 ; 2 ] > > ,
177178 verification_mode : VerificationMode ,
@@ -1568,6 +1569,7 @@ impl<B: Backend + 'static> TurboTasksApi for TurboTasks<B> {
15681569 task : TaskId ,
15691570 index : CellId ,
15701571 is_serializable_cell_content : bool ,
1572+ is_session_stateful : bool ,
15711573 content : CellContent ,
15721574 updated_key_hashes : Option < SmallVec < [ u64 ; 2 ] > > ,
15731575 verification_mode : VerificationMode ,
@@ -1576,6 +1578,7 @@ impl<B: Backend + 'static> TurboTasksApi for TurboTasks<B> {
15761578 task,
15771579 index,
15781580 is_serializable_cell_content,
1581+ is_session_stateful,
15791582 content,
15801583 updated_key_hashes,
15811584 verification_mode,
@@ -2021,6 +2024,7 @@ pub struct CurrentCellRef {
20212024 current_task : TaskId ,
20222025 index : CellId ,
20232026 is_serializable_cell_content : bool ,
2027+ is_session_stateful : bool ,
20242028}
20252029
20262030type VcReadTarget < T > = <<T as VcValueType >:: Read as VcRead < T > >:: Target ;
@@ -2069,6 +2073,7 @@ impl CurrentCellRef {
20692073 self . current_task ,
20702074 self . index ,
20712075 self . is_serializable_cell_content ,
2076+ self . is_session_stateful ,
20722077 CellContent ( Some ( update) ) ,
20732078 updated_key_hashes,
20742079 VerificationMode :: EqualityCheck ,
@@ -2213,6 +2218,7 @@ impl CurrentCellRef {
22132218 self . current_task ,
22142219 self . index ,
22152220 self . is_serializable_cell_content ,
2221+ self . is_session_stateful ,
22162222 CellContent ( Some ( SharedReference :: new ( triomphe:: Arc :: new ( new_value) ) ) ) ,
22172223 None ,
22182224 verification_mode,
@@ -2259,6 +2265,7 @@ impl CurrentCellRef {
22592265 self . current_task ,
22602266 self . index ,
22612267 self . is_serializable_cell_content ,
2268+ self . is_session_stateful ,
22622269 CellContent ( Some ( shared_ref) ) ,
22632270 None ,
22642271 verification_mode,
@@ -2279,10 +2286,18 @@ fn extract_sr_value<T: VcValueType>(sr: &SharedReference) -> &T {
22792286}
22802287
22812288pub fn find_cell_by_type < T : VcValueType > ( ) -> CurrentCellRef {
2282- find_cell_by_id ( T :: get_value_type_id ( ) , T :: has_serialization ( ) )
2289+ find_cell_by_id (
2290+ T :: get_value_type_id ( ) ,
2291+ T :: has_serialization ( ) ,
2292+ T :: is_session_stateful ( ) ,
2293+ )
22832294}
22842295
2285- pub fn find_cell_by_id ( ty : ValueTypeId , is_serializable_cell_content : bool ) -> CurrentCellRef {
2296+ pub fn find_cell_by_id (
2297+ ty : ValueTypeId ,
2298+ is_serializable_cell_content : bool ,
2299+ is_session_stateful : bool ,
2300+ ) -> CurrentCellRef {
22862301 CURRENT_TASK_STATE . with ( |ts| {
22872302 let current_task = current_task ( "celling turbo_tasks values" ) ;
22882303 let mut ts = ts. write ( ) . unwrap ( ) ;
@@ -2294,6 +2309,7 @@ pub fn find_cell_by_id(ty: ValueTypeId, is_serializable_cell_content: bool) -> C
22942309 current_task,
22952310 index : CellId { type_id : ty, index } ,
22962311 is_serializable_cell_content,
2312+ is_session_stateful,
22972313 }
22982314 } )
22992315}
0 commit comments