From aa0f6509bcb67cc362f7fbe8d88761ef082422fd Mon Sep 17 00:00:00 2001 From: yair Date: Fri, 21 Sep 2018 15:59:06 +0300 Subject: [PATCH] Update dependency: schedule/tracking -> schedule/tracing --- Libraries/Renderer/oss/ReactFabric-dev.js | 38 +++++++++---------- .../Renderer/oss/ReactFabric-profiling.js | 30 +++++++-------- .../Renderer/oss/ReactNativeRenderer-dev.js | 38 +++++++++---------- .../oss/ReactNativeRenderer-profiling.js | 30 +++++++-------- 4 files changed, 68 insertions(+), 68 deletions(-) diff --git a/Libraries/Renderer/oss/ReactFabric-dev.js b/Libraries/Renderer/oss/ReactFabric-dev.js index 410669cb533e03..ddb745e56df4ca 100644 --- a/Libraries/Renderer/oss/ReactFabric-dev.js +++ b/Libraries/Renderer/oss/ReactFabric-dev.js @@ -26,7 +26,7 @@ var deepFreezeAndThrowOnMutationInDev = require("deepFreezeAndThrowOnMutationInD var TextInputState = require("TextInputState"); var FabricUIManager = require("FabricUIManager"); var checkPropTypes = require("prop-types/checkPropTypes"); -var tracking = require("schedule/tracking"); +var tracing = require("schedule/tracing"); var ExceptionsManager = require("ExceptionsManager"); /** @@ -5502,7 +5502,7 @@ function createFiberRoot(containerInfo, isAsync, hydrate) { firstBatch: null, nextScheduledRoot: null, - interactionThreadID: tracking.unstable_getThreadID(), + interactionThreadID: tracing.unstable_getThreadID(), memoizedInteractions: new Set(), pendingInteractionMap: new Map() }; @@ -12885,12 +12885,12 @@ var warnAboutInvalidUpdates = void 0; if (enableSchedulerTracking) { // Provide explicit error message when production+profiling bundle of e.g. react-dom - // is used with production (non-profiling) bundle of schedule/tracking + // is used with production (non-profiling) bundle of schedule/tracing invariant( - tracking.__interactionsRef != null && - tracking.__interactionsRef.current != null, + tracing.__interactionsRef != null && + tracing.__interactionsRef.current != null, "It is not supported to run the profiling version of a renderer (for example, `react-dom/profiling`) " + - "without also replacing the `schedule/tracking` module with `schedule/tracking-profiling`. " + + "without also replacing the `schedule/tracing` module with `schedule/tracing-profiling`. " + "Your bundler might have a setting for aliasing both modules. " + "Learn more at http://fb.me/react-profiling" ); @@ -13276,8 +13276,8 @@ function commitRoot(root, finishedWork) { if (enableSchedulerTracking) { // Restore any pending interactions at this point, // So that cascading work triggered during the render phase will be accounted for. - prevInteractions = tracking.__interactionsRef.current; - tracking.__interactionsRef.current = root.memoizedInteractions; + prevInteractions = tracing.__interactionsRef.current; + tracing.__interactionsRef.current = root.memoizedInteractions; // We are potentially finished with the current batch of interactions. // So we should clear them out of the pending interaction map. @@ -13455,12 +13455,12 @@ function commitRoot(root, finishedWork) { onCommit(root, earliestRemainingTimeAfterCommit); if (enableSchedulerTracking) { - tracking.__interactionsRef.current = prevInteractions; + tracing.__interactionsRef.current = prevInteractions; var subscriber = void 0; try { - subscriber = tracking.__subscriberRef.current; + subscriber = tracing.__subscriberRef.current; if (subscriber !== null && root.memoizedInteractions.size > 0) { var threadID = computeThreadID( committedExpirationTime, @@ -13858,8 +13858,8 @@ function renderRoot(root, isYieldy, isExpired) { if (enableSchedulerTracking) { // We're about to start new tracked work. // Restore pending interactions so cascading work triggered during the render phase will be accounted for. - prevInteractions = tracking.__interactionsRef.current; - tracking.__interactionsRef.current = root.memoizedInteractions; + prevInteractions = tracing.__interactionsRef.current; + tracing.__interactionsRef.current = root.memoizedInteractions; } // Check if we're starting from a fresh stack, or if we're resuming from @@ -13902,7 +13902,7 @@ function renderRoot(root, isYieldy, isExpired) { root.memoizedInteractions = interactions; if (interactions.size > 0) { - var subscriber = tracking.__subscriberRef.current; + var subscriber = tracing.__subscriberRef.current; if (subscriber !== null) { var threadID = computeThreadID( expirationTime, @@ -13987,7 +13987,7 @@ function renderRoot(root, isYieldy, isExpired) { if (enableSchedulerTracking) { // Tracked work is done for now; restore the previous interactions. - tracking.__interactionsRef.current = prevInteractions; + tracing.__interactionsRef.current = prevInteractions; } // We're done performing work. Time to clean up. @@ -14267,13 +14267,13 @@ function retrySuspendedRoot(root, fiber, suspendedTime) { if (rootExpirationTime !== NoWork) { if (enableSchedulerTracking) { // Restore previous interactions so that new work is associated with them. - var prevInteractions = tracking.__interactionsRef.current; - tracking.__interactionsRef.current = root.memoizedInteractions; + var prevInteractions = tracing.__interactionsRef.current; + tracing.__interactionsRef.current = root.memoizedInteractions; // Because suspense timeouts do not decrement the interaction count, // Continued suspense work should also not increment the count. storeInteractionsForExpirationTime(root, rootExpirationTime, false); requestWork(root, rootExpirationTime); - tracking.__interactionsRef.current = prevInteractions; + tracing.__interactionsRef.current = prevInteractions; } else { requestWork(root, rootExpirationTime); } @@ -14340,7 +14340,7 @@ function storeInteractionsForExpirationTime( return; } - var interactions = tracking.__interactionsRef.current; + var interactions = tracing.__interactionsRef.current; if (interactions.size > 0) { var pendingInteractions = root.pendingInteractionMap.get(expirationTime); if (pendingInteractions != null) { @@ -14363,7 +14363,7 @@ function storeInteractionsForExpirationTime( } } - var subscriber = tracking.__subscriberRef.current; + var subscriber = tracing.__subscriberRef.current; if (subscriber !== null) { var threadID = computeThreadID(expirationTime, root.interactionThreadID); subscriber.onWorkScheduled(interactions, threadID); diff --git a/Libraries/Renderer/oss/ReactFabric-profiling.js b/Libraries/Renderer/oss/ReactFabric-profiling.js index de00c9c48571bf..b346e87abaab47 100644 --- a/Libraries/Renderer/oss/ReactFabric-profiling.js +++ b/Libraries/Renderer/oss/ReactFabric-profiling.js @@ -19,7 +19,7 @@ var ReactNativeViewConfigRegistry = require("ReactNativeViewConfigRegistry"), flattenStyle = require("flattenStyle"), TextInputState = require("TextInputState"), FabricUIManager = require("FabricUIManager"), - tracking = require("schedule/tracking"), + tracing = require("schedule/tracing"), ExceptionsManager = require("ExceptionsManager"); function invariant(condition, format, a, b, c, d, e, f) { if (!condition) { @@ -4509,9 +4509,9 @@ function unwindWork(workInProgress) { var Dispatcher = { readContext: readContext }, ReactCurrentOwner$2 = ReactSharedInternals.ReactCurrentOwner; invariant( - null != tracking.__interactionsRef && - null != tracking.__interactionsRef.current, - "It is not supported to run the profiling version of a renderer (for example, `react-dom/profiling`) without also replacing the `schedule/tracking` module with `schedule/tracking-profiling`. Your bundler might have a setting for aliasing both modules. Learn more at http://fb.me/react-profiling" + null != tracing.__interactionsRef && + null != tracing.__interactionsRef.current, + "It is not supported to run the profiling version of a renderer (for example, `react-dom/profiling`) without also replacing the `schedule/tracing` module with `schedule/tracing-profiling`. Your bundler might have a setting for aliasing both modules. Learn more at http://fb.me/react-profiling" ); var isWorking = !1, nextUnitOfWork = null, @@ -4810,8 +4810,8 @@ function commitRoot(root, finishedWork) { ); updateExpirationTimeBeforeCommit = null; var committedInteractions = []; - updateExpirationTimeBeforeCommit = tracking.__interactionsRef.current; - tracking.__interactionsRef.current = root.memoizedInteractions; + updateExpirationTimeBeforeCommit = tracing.__interactionsRef.current; + tracing.__interactionsRef.current = root.memoizedInteractions; root.pendingInteractionMap.forEach(function( scheduledInteractions, scheduledExpirationTime @@ -4893,11 +4893,11 @@ function commitRoot(root, finishedWork) { : childExpirationTimeBeforeCommit; 0 === finishedWork && (legacyErrorBoundariesThatAlreadyFailed = null); onCommit(root, finishedWork); - tracking.__interactionsRef.current = updateExpirationTimeBeforeCommit; + tracing.__interactionsRef.current = updateExpirationTimeBeforeCommit; var subscriber = void 0; try { if ( - ((subscriber = tracking.__subscriberRef.current), + ((subscriber = tracing.__subscriberRef.current), null !== subscriber && 0 < root.memoizedInteractions.size) ) subscriber.onWorkStopped( @@ -5182,8 +5182,8 @@ function renderRoot(root, isYieldy, isExpired) { ReactCurrentOwner$2.currentDispatcher = Dispatcher; var expirationTime = root.nextExpirationTimeToWorkOn, prevInteractions = null; - prevInteractions = tracking.__interactionsRef.current; - tracking.__interactionsRef.current = root.memoizedInteractions; + prevInteractions = tracing.__interactionsRef.current; + tracing.__interactionsRef.current = root.memoizedInteractions; if ( expirationTime !== nextRenderExpirationTime || root !== nextRoot || @@ -5210,7 +5210,7 @@ function renderRoot(root, isYieldy, isExpired) { }); root.memoizedInteractions = interactions; if (0 < interactions.size) { - var subscriber = tracking.__subscriberRef.current; + var subscriber = tracing.__subscriberRef.current; if (null !== subscriber) { var threadID = 1e3 * expirationTime + root.interactionThreadID; try { @@ -5258,7 +5258,7 @@ function renderRoot(root, isYieldy, isExpired) { } break; } while (1); - tracking.__interactionsRef.current = prevInteractions; + tracing.__interactionsRef.current = prevInteractions; isWorking = !1; lastContextWithAllBitsObserved = lastContextDependency = currentlyRenderingFiber = ReactCurrentOwner$2.currentDispatcher = null; if (subscriber) (nextRoot = null), (root.finishedWork = null); @@ -5363,7 +5363,7 @@ function storeInteractionsForExpirationTime( expirationTime, updateInteractionCounts ) { - var interactions = tracking.__interactionsRef.current; + var interactions = tracing.__interactionsRef.current; if (0 < interactions.size) { var pendingInteractions = root.pendingInteractionMap.get(expirationTime); null != pendingInteractions @@ -5378,7 +5378,7 @@ function storeInteractionsForExpirationTime( interactions.forEach(function(interaction) { interaction.__count++; })); - var subscriber = tracking.__subscriberRef.current; + var subscriber = tracing.__subscriberRef.current; if (null !== subscriber) subscriber.onWorkScheduled( interactions, @@ -5961,7 +5961,7 @@ var roots = new Map(), expirationTime: 0, firstBatch: null, nextScheduledRoot: null, - interactionThreadID: tracking.unstable_getThreadID(), + interactionThreadID: tracing.unstable_getThreadID(), memoizedInteractions: new Set(), pendingInteractionMap: new Map() }; diff --git a/Libraries/Renderer/oss/ReactNativeRenderer-dev.js b/Libraries/Renderer/oss/ReactNativeRenderer-dev.js index b3fdfc9aebd3aa..97cf3bc9620901 100644 --- a/Libraries/Renderer/oss/ReactNativeRenderer-dev.js +++ b/Libraries/Renderer/oss/ReactNativeRenderer-dev.js @@ -26,7 +26,7 @@ var deepDiffer = require("deepDiffer"); var flattenStyle = require("flattenStyle"); var TextInputState = require("TextInputState"); var checkPropTypes = require("prop-types/checkPropTypes"); -var tracking = require("schedule/tracking"); +var tracing = require("schedule/tracing"); var ExceptionsManager = require("ExceptionsManager"); /** @@ -5796,7 +5796,7 @@ function createFiberRoot(containerInfo, isAsync, hydrate) { firstBatch: null, nextScheduledRoot: null, - interactionThreadID: tracking.unstable_getThreadID(), + interactionThreadID: tracing.unstable_getThreadID(), memoizedInteractions: new Set(), pendingInteractionMap: new Map() }; @@ -13178,12 +13178,12 @@ var warnAboutInvalidUpdates = void 0; if (enableSchedulerTracking) { // Provide explicit error message when production+profiling bundle of e.g. react-dom - // is used with production (non-profiling) bundle of schedule/tracking + // is used with production (non-profiling) bundle of schedule/tracing invariant( - tracking.__interactionsRef != null && - tracking.__interactionsRef.current != null, + tracing.__interactionsRef != null && + tracing.__interactionsRef.current != null, "It is not supported to run the profiling version of a renderer (for example, `react-dom/profiling`) " + - "without also replacing the `schedule/tracking` module with `schedule/tracking-profiling`. " + + "without also replacing the `schedule/tracing` module with `schedule/tracing-profiling`. " + "Your bundler might have a setting for aliasing both modules. " + "Learn more at http://fb.me/react-profiling" ); @@ -13569,8 +13569,8 @@ function commitRoot(root, finishedWork) { if (enableSchedulerTracking) { // Restore any pending interactions at this point, // So that cascading work triggered during the render phase will be accounted for. - prevInteractions = tracking.__interactionsRef.current; - tracking.__interactionsRef.current = root.memoizedInteractions; + prevInteractions = tracing.__interactionsRef.current; + tracing.__interactionsRef.current = root.memoizedInteractions; // We are potentially finished with the current batch of interactions. // So we should clear them out of the pending interaction map. @@ -13748,12 +13748,12 @@ function commitRoot(root, finishedWork) { onCommit(root, earliestRemainingTimeAfterCommit); if (enableSchedulerTracking) { - tracking.__interactionsRef.current = prevInteractions; + tracing.__interactionsRef.current = prevInteractions; var subscriber = void 0; try { - subscriber = tracking.__subscriberRef.current; + subscriber = tracing.__subscriberRef.current; if (subscriber !== null && root.memoizedInteractions.size > 0) { var threadID = computeThreadID( committedExpirationTime, @@ -14151,8 +14151,8 @@ function renderRoot(root, isYieldy, isExpired) { if (enableSchedulerTracking) { // We're about to start new tracked work. // Restore pending interactions so cascading work triggered during the render phase will be accounted for. - prevInteractions = tracking.__interactionsRef.current; - tracking.__interactionsRef.current = root.memoizedInteractions; + prevInteractions = tracing.__interactionsRef.current; + tracing.__interactionsRef.current = root.memoizedInteractions; } // Check if we're starting from a fresh stack, or if we're resuming from @@ -14195,7 +14195,7 @@ function renderRoot(root, isYieldy, isExpired) { root.memoizedInteractions = interactions; if (interactions.size > 0) { - var subscriber = tracking.__subscriberRef.current; + var subscriber = tracing.__subscriberRef.current; if (subscriber !== null) { var threadID = computeThreadID( expirationTime, @@ -14280,7 +14280,7 @@ function renderRoot(root, isYieldy, isExpired) { if (enableSchedulerTracking) { // Tracked work is done for now; restore the previous interactions. - tracking.__interactionsRef.current = prevInteractions; + tracing.__interactionsRef.current = prevInteractions; } // We're done performing work. Time to clean up. @@ -14560,13 +14560,13 @@ function retrySuspendedRoot(root, fiber, suspendedTime) { if (rootExpirationTime !== NoWork) { if (enableSchedulerTracking) { // Restore previous interactions so that new work is associated with them. - var prevInteractions = tracking.__interactionsRef.current; - tracking.__interactionsRef.current = root.memoizedInteractions; + var prevInteractions = tracing.__interactionsRef.current; + tracing.__interactionsRef.current = root.memoizedInteractions; // Because suspense timeouts do not decrement the interaction count, // Continued suspense work should also not increment the count. storeInteractionsForExpirationTime(root, rootExpirationTime, false); requestWork(root, rootExpirationTime); - tracking.__interactionsRef.current = prevInteractions; + tracing.__interactionsRef.current = prevInteractions; } else { requestWork(root, rootExpirationTime); } @@ -14633,7 +14633,7 @@ function storeInteractionsForExpirationTime( return; } - var interactions = tracking.__interactionsRef.current; + var interactions = tracing.__interactionsRef.current; if (interactions.size > 0) { var pendingInteractions = root.pendingInteractionMap.get(expirationTime); if (pendingInteractions != null) { @@ -14656,7 +14656,7 @@ function storeInteractionsForExpirationTime( } } - var subscriber = tracking.__subscriberRef.current; + var subscriber = tracing.__subscriberRef.current; if (subscriber !== null) { var threadID = computeThreadID(expirationTime, root.interactionThreadID); subscriber.onWorkScheduled(interactions, threadID); diff --git a/Libraries/Renderer/oss/ReactNativeRenderer-profiling.js b/Libraries/Renderer/oss/ReactNativeRenderer-profiling.js index f9c2b56db17e78..a033ecd5aeb692 100644 --- a/Libraries/Renderer/oss/ReactNativeRenderer-profiling.js +++ b/Libraries/Renderer/oss/ReactNativeRenderer-profiling.js @@ -19,7 +19,7 @@ var ReactNativeViewConfigRegistry = require("ReactNativeViewConfigRegistry"), deepDiffer = require("deepDiffer"), flattenStyle = require("flattenStyle"), TextInputState = require("TextInputState"), - tracking = require("schedule/tracking"), + tracing = require("schedule/tracing"), ExceptionsManager = require("ExceptionsManager"); function invariant(condition, format, a, b, c, d, e, f) { if (!condition) { @@ -4757,9 +4757,9 @@ function unwindWork(workInProgress) { var Dispatcher = { readContext: readContext }, ReactCurrentOwner$2 = ReactSharedInternals.ReactCurrentOwner; invariant( - null != tracking.__interactionsRef && - null != tracking.__interactionsRef.current, - "It is not supported to run the profiling version of a renderer (for example, `react-dom/profiling`) without also replacing the `schedule/tracking` module with `schedule/tracking-profiling`. Your bundler might have a setting for aliasing both modules. Learn more at http://fb.me/react-profiling" + null != tracing.__interactionsRef && + null != tracing.__interactionsRef.current, + "It is not supported to run the profiling version of a renderer (for example, `react-dom/profiling`) without also replacing the `schedule/tracing` module with `schedule/tracing-profiling`. Your bundler might have a setting for aliasing both modules. Learn more at http://fb.me/react-profiling" ); var isWorking = !1, nextUnitOfWork = null, @@ -5014,8 +5014,8 @@ function commitRoot(root, finishedWork) { ); updateExpirationTimeBeforeCommit = null; var committedInteractions = []; - updateExpirationTimeBeforeCommit = tracking.__interactionsRef.current; - tracking.__interactionsRef.current = root.memoizedInteractions; + updateExpirationTimeBeforeCommit = tracing.__interactionsRef.current; + tracing.__interactionsRef.current = root.memoizedInteractions; root.pendingInteractionMap.forEach(function( scheduledInteractions, scheduledExpirationTime @@ -5097,11 +5097,11 @@ function commitRoot(root, finishedWork) { : childExpirationTimeBeforeCommit; 0 === finishedWork && (legacyErrorBoundariesThatAlreadyFailed = null); onCommit(root, finishedWork); - tracking.__interactionsRef.current = updateExpirationTimeBeforeCommit; + tracing.__interactionsRef.current = updateExpirationTimeBeforeCommit; var subscriber = void 0; try { if ( - ((subscriber = tracking.__subscriberRef.current), + ((subscriber = tracing.__subscriberRef.current), null !== subscriber && 0 < root.memoizedInteractions.size) ) subscriber.onWorkStopped( @@ -5418,8 +5418,8 @@ function renderRoot(root, isYieldy, isExpired) { ReactCurrentOwner$2.currentDispatcher = Dispatcher; var expirationTime = root.nextExpirationTimeToWorkOn, prevInteractions = null; - prevInteractions = tracking.__interactionsRef.current; - tracking.__interactionsRef.current = root.memoizedInteractions; + prevInteractions = tracing.__interactionsRef.current; + tracing.__interactionsRef.current = root.memoizedInteractions; if ( expirationTime !== nextRenderExpirationTime || root !== nextRoot || @@ -5446,7 +5446,7 @@ function renderRoot(root, isYieldy, isExpired) { }); root.memoizedInteractions = interactions; if (0 < interactions.size) { - var subscriber = tracking.__subscriberRef.current; + var subscriber = tracing.__subscriberRef.current; if (null !== subscriber) { var threadID = 1e3 * expirationTime + root.interactionThreadID; try { @@ -5494,7 +5494,7 @@ function renderRoot(root, isYieldy, isExpired) { } break; } while (1); - tracking.__interactionsRef.current = prevInteractions; + tracing.__interactionsRef.current = prevInteractions; isWorking = !1; lastContextWithAllBitsObserved = lastContextDependency = currentlyRenderingFiber = ReactCurrentOwner$2.currentDispatcher = null; if (subscriber) (nextRoot = null), (root.finishedWork = null); @@ -5599,7 +5599,7 @@ function storeInteractionsForExpirationTime( expirationTime, updateInteractionCounts ) { - var interactions = tracking.__interactionsRef.current; + var interactions = tracing.__interactionsRef.current; if (0 < interactions.size) { var pendingInteractions = root.pendingInteractionMap.get(expirationTime); null != pendingInteractions @@ -5614,7 +5614,7 @@ function storeInteractionsForExpirationTime( interactions.forEach(function(interaction) { interaction.__count++; })); - var subscriber = tracking.__subscriberRef.current; + var subscriber = tracing.__subscriberRef.current; if (null !== subscriber) subscriber.onWorkScheduled( interactions, @@ -6197,7 +6197,7 @@ var roots = new Map(), expirationTime: 0, firstBatch: null, nextScheduledRoot: null, - interactionThreadID: tracking.unstable_getThreadID(), + interactionThreadID: tracing.unstable_getThreadID(), memoizedInteractions: new Set(), pendingInteractionMap: new Map() };