@@ -29,17 +29,17 @@ const VISIBLE_BLOCKING_RULES: BlockingRule[] = [
29
29
{
30
30
blockedType : ChoreType . VISIBLE ,
31
31
blockingType : ChoreType . NODE_DIFF ,
32
- match : ( blocked , blocking , container ) =>
33
- isDescendant ( blocked , blocking , container ) || isDescendant ( blocking , blocked , container ) ,
32
+ match : ( blocked , blocking ) =>
33
+ isDescendant ( blocked , blocking ) || isDescendant ( blocking , blocked ) ,
34
34
} ,
35
35
// COMPONENT blocks VISIBLE on same host
36
36
// if the blocked chore is a child of the blocking chore
37
37
// or the blocked chore is a sibling of the blocking chore
38
38
{
39
39
blockedType : ChoreType . VISIBLE ,
40
40
blockingType : ChoreType . COMPONENT ,
41
- match : ( blocked , blocking , container ) =>
42
- isDescendant ( blocked , blocking , container ) || isDescendant ( blocking , blocked , container ) ,
41
+ match : ( blocked , blocking ) =>
42
+ isDescendant ( blocked , blocking ) || isDescendant ( blocking , blocked ) ,
43
43
} ,
44
44
] ;
45
45
@@ -103,17 +103,13 @@ const BLOCKING_RULES: BlockingRule[] = [
103
103
} ,
104
104
] ;
105
105
106
- function isDescendant ( descendantChore : Chore , ancestorChore : Chore , container : Container ) : boolean {
106
+ function isDescendant ( descendantChore : Chore , ancestorChore : Chore ) : boolean {
107
107
const descendantHost = descendantChore . $host$ ;
108
108
const ancestorHost = ancestorChore . $host$ ;
109
109
if ( ! vnode_isVNode ( descendantHost ) || ! vnode_isVNode ( ancestorHost ) ) {
110
110
return false ;
111
111
}
112
- return vnode_isDescendantOf (
113
- descendantHost ,
114
- ancestorHost ,
115
- ( container as ClientContainer ) . rootVNode
116
- ) ;
112
+ return vnode_isDescendantOf ( descendantHost , ancestorHost ) ;
117
113
}
118
114
119
115
function isSameHost ( a : Chore , b : Chore ) : boolean {
@@ -134,7 +130,7 @@ function findBlockingChoreInQueue(
134
130
if ( candidate . $type$ >= ChoreType . VISIBLE || candidate . $type$ === ChoreType . TASK ) {
135
131
continue ;
136
132
}
137
- if ( isDescendant ( chore , candidate , container ) ) {
133
+ if ( isDescendant ( chore , candidate ) ) {
138
134
return candidate ;
139
135
}
140
136
}
@@ -152,22 +148,14 @@ export function findBlockingChore(
152
148
if ( blockingChoreInChoreQueue ) {
153
149
return blockingChoreInChoreQueue ;
154
150
}
155
- const blockingChoreInBlockedChores = findBlockingChoreInQueue (
156
- chore ,
157
- Array . from ( blockedChores ) ,
158
- container
159
- ) ;
160
- if ( blockingChoreInBlockedChores ) {
161
- return blockingChoreInBlockedChores ;
162
- }
163
- const blockingChoreInRunningChores = findBlockingChoreInQueue (
164
- chore ,
165
- Array . from ( runningChores ) ,
166
- container
167
- ) ;
168
- if ( blockingChoreInRunningChores ) {
169
- return blockingChoreInRunningChores ;
170
- }
151
+ // const blockingChoreInBlockedChores = findBlockingChoreInQueue(
152
+ // chore,
153
+ // Array.from(blockedChores),
154
+ // container
155
+ // );
156
+ // if (blockingChoreInBlockedChores) {
157
+ // return blockingChoreInBlockedChores;
158
+ // }
171
159
172
160
for ( const rule of BLOCKING_RULES ) {
173
161
if ( chore . $type$ !== rule . blockedType ) {
0 commit comments