Skip to content

Commit 4537c13

Browse files
author
Brian Vaughn
committed
Added "Dev" suffice to PendingPassiveUnmountDev flag
1 parent 5223a07 commit 4537c13

File tree

3 files changed

+31
-31
lines changed

3 files changed

+31
-31
lines changed

packages/react-reconciler/src/ReactFiberWorkLoop.new.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ import {
116116
Snapshot,
117117
Callback,
118118
Passive,
119-
PassiveUnmountPending,
119+
PassiveUnmountPendingDev,
120120
Incomplete,
121121
HostEffectMask,
122122
Hydrating,
@@ -2313,10 +2313,10 @@ export function enqueuePendingPassiveHookEffectUnmount(
23132313
pendingPassiveHookEffectsUnmount.push(effect, fiber);
23142314
if (__DEV__) {
23152315
if (deferPassiveEffectCleanupDuringUnmount) {
2316-
fiber.effectTag |= PassiveUnmountPending;
2316+
fiber.effectTag |= PassiveUnmountPendingDev;
23172317
const alternate = fiber.alternate;
23182318
if (alternate !== null) {
2319-
alternate.effectTag |= PassiveUnmountPending;
2319+
alternate.effectTag |= PassiveUnmountPendingDev;
23202320
}
23212321
}
23222322
}
@@ -2385,10 +2385,10 @@ function flushPassiveEffectsImpl() {
23852385

23862386
if (__DEV__) {
23872387
if (deferPassiveEffectCleanupDuringUnmount) {
2388-
fiber.effectTag &= ~PassiveUnmountPending;
2388+
fiber.effectTag &= ~PassiveUnmountPendingDev;
23892389
const alternate = fiber.alternate;
23902390
if (alternate !== null) {
2391-
alternate.effectTag &= ~PassiveUnmountPending;
2391+
alternate.effectTag &= ~PassiveUnmountPendingDev;
23922392
}
23932393
}
23942394
}
@@ -2872,7 +2872,7 @@ function warnAboutUpdateOnUnmountedFiberInDEV(fiber) {
28722872
) {
28732873
// If there are pending passive effects unmounts for this Fiber,
28742874
// we can assume that they would have prevented this update.
2875-
if ((fiber.effectTag & PassiveUnmountPending) !== NoEffect) {
2875+
if ((fiber.effectTag & PassiveUnmountPendingDev) !== NoEffect) {
28762876
return;
28772877
}
28782878
}

packages/react-reconciler/src/ReactFiberWorkLoop.old.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ import {
116116
Snapshot,
117117
Callback,
118118
Passive,
119-
PassiveUnmountPending,
119+
PassiveUnmountPendingDev,
120120
Incomplete,
121121
HostEffectMask,
122122
Hydrating,
@@ -2332,10 +2332,10 @@ export function enqueuePendingPassiveHookEffectUnmount(
23322332
pendingPassiveHookEffectsUnmount.push(effect, fiber);
23332333
if (__DEV__) {
23342334
if (deferPassiveEffectCleanupDuringUnmount) {
2335-
fiber.effectTag |= PassiveUnmountPending;
2335+
fiber.effectTag |= PassiveUnmountPendingDev;
23362336
const alternate = fiber.alternate;
23372337
if (alternate !== null) {
2338-
alternate.effectTag |= PassiveUnmountPending;
2338+
alternate.effectTag |= PassiveUnmountPendingDev;
23392339
}
23402340
}
23412341
}
@@ -2404,10 +2404,10 @@ function flushPassiveEffectsImpl() {
24042404

24052405
if (__DEV__) {
24062406
if (deferPassiveEffectCleanupDuringUnmount) {
2407-
fiber.effectTag &= ~PassiveUnmountPending;
2407+
fiber.effectTag &= ~PassiveUnmountPendingDev;
24082408
const alternate = fiber.alternate;
24092409
if (alternate !== null) {
2410-
alternate.effectTag &= ~PassiveUnmountPending;
2410+
alternate.effectTag &= ~PassiveUnmountPendingDev;
24112411
}
24122412
}
24132413
}
@@ -2894,7 +2894,7 @@ function warnAboutUpdateOnUnmountedFiberInDEV(fiber) {
28942894
) {
28952895
// If there are pending passive effects unmounts for this Fiber,
28962896
// we can assume that they would have prevented this update.
2897-
if ((fiber.effectTag & PassiveUnmountPending) !== NoEffect) {
2897+
if ((fiber.effectTag & PassiveUnmountPendingDev) !== NoEffect) {
28982898
return;
28992899
}
29002900
}

packages/react-reconciler/src/ReactSideEffectTags.js

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -10,29 +10,29 @@
1010
export type SideEffectTag = number;
1111

1212
// Don't change these two values. They're used by React Dev Tools.
13-
export const NoEffect = /* */ 0b00000000000000;
14-
export const PerformedWork = /* */ 0b00000000000001;
13+
export const NoEffect = /* */ 0b00000000000000;
14+
export const PerformedWork = /* */ 0b00000000000001;
1515

1616
// You can change the rest (and add more).
17-
export const Placement = /* */ 0b00000000000010;
18-
export const Update = /* */ 0b00000000000100;
19-
export const PlacementAndUpdate = /* */ 0b00000000000110;
20-
export const Deletion = /* */ 0b00000000001000;
21-
export const ContentReset = /* */ 0b00000000010000;
22-
export const Callback = /* */ 0b00000000100000;
23-
export const DidCapture = /* */ 0b00000001000000;
24-
export const Ref = /* */ 0b00000010000000;
25-
export const Snapshot = /* */ 0b00000100000000;
26-
export const Passive = /* */ 0b00001000000000;
27-
export const PassiveUnmountPending = /* */ 0b10000000000000;
28-
export const Hydrating = /* */ 0b00010000000000;
29-
export const HydratingAndUpdate = /* */ 0b00010000000100;
17+
export const Placement = /* */ 0b00000000000010;
18+
export const Update = /* */ 0b00000000000100;
19+
export const PlacementAndUpdate = /* */ 0b00000000000110;
20+
export const Deletion = /* */ 0b00000000001000;
21+
export const ContentReset = /* */ 0b00000000010000;
22+
export const Callback = /* */ 0b00000000100000;
23+
export const DidCapture = /* */ 0b00000001000000;
24+
export const Ref = /* */ 0b00000010000000;
25+
export const Snapshot = /* */ 0b00000100000000;
26+
export const Passive = /* */ 0b00001000000000;
27+
export const PassiveUnmountPendingDev = /* */ 0b10000000000000;
28+
export const Hydrating = /* */ 0b00010000000000;
29+
export const HydratingAndUpdate = /* */ 0b00010000000100;
3030

3131
// Passive & Update & Callback & Ref & Snapshot
32-
export const LifecycleEffectMask = /* */ 0b00001110100100;
32+
export const LifecycleEffectMask = /* */ 0b00001110100100;
3333

3434
// Union of all host effects
35-
export const HostEffectMask = /* */ 0b00011111111111;
35+
export const HostEffectMask = /* */ 0b00011111111111;
3636

37-
export const Incomplete = /* */ 0b00100000000000;
38-
export const ShouldCapture = /* */ 0b01000000000000;
37+
export const Incomplete = /* */ 0b00100000000000;
38+
export const ShouldCapture = /* */ 0b01000000000000;

0 commit comments

Comments
 (0)