MCPcopy Create free account
hub / github.com/krasimir/react-in-patterns / stopWorkLoopTimer

Function stopWorkLoopTimer

code/higher-order-components/public/app.js:7749–7770  ·  view source on GitHub ↗
(interruptedBy)

Source from the content-addressed store, hash-verified

7747}
7748
7749function stopWorkLoopTimer(interruptedBy) {
7750 if (enableUserTimingAPI) {
7751 if (!supportsUserTiming) {
7752 return;
7753 }
7754 var warning$$1 = null;
7755 if (interruptedBy !== null) {
7756 if (interruptedBy.tag === HostRoot) {
7757 warning$$1 = 'A top-level update interrupted the previous render';
7758 } else {
7759 var componentName = getComponentName(interruptedBy) || 'Unknown';
7760 warning$$1 = 'An update to ' + componentName + ' interrupted the previous render';
7761 }
7762 } else if (commitCountInCurrentWorkLoop > 1) {
7763 warning$$1 = 'There were cascading updates';
7764 }
7765 commitCountInCurrentWorkLoop = 0;
7766 // Pause any measurements until the next loop.
7767 pauseTimers();
7768 endMark('(React Tree Reconciliation)', '(React Tree Reconciliation)', warning$$1);
7769 }
7770}
7771
7772function startCommitTimer() {
7773 if (enableUserTimingAPI) {

Callers 1

renderRootFunction · 0.70

Calls 3

getComponentNameFunction · 0.70
pauseTimersFunction · 0.70
endMarkFunction · 0.70

Tested by

no test coverage detected