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

Function stopWorkLoopTimer

code/one-direction-data-flow/public/app.js:7628–7649  ·  view source on GitHub ↗
(interruptedBy)

Source from the content-addressed store, hash-verified

7626}
7627
7628function stopWorkLoopTimer(interruptedBy) {
7629 if (enableUserTimingAPI) {
7630 if (!supportsUserTiming) {
7631 return;
7632 }
7633 var warning$$1 = null;
7634 if (interruptedBy !== null) {
7635 if (interruptedBy.tag === HostRoot) {
7636 warning$$1 = 'A top-level update interrupted the previous render';
7637 } else {
7638 var componentName = getComponentName(interruptedBy) || 'Unknown';
7639 warning$$1 = 'An update to ' + componentName + ' interrupted the previous render';
7640 }
7641 } else if (commitCountInCurrentWorkLoop > 1) {
7642 warning$$1 = 'There were cascading updates';
7643 }
7644 commitCountInCurrentWorkLoop = 0;
7645 // Pause any measurements until the next loop.
7646 pauseTimers();
7647 endMark('(React Tree Reconciliation)', '(React Tree Reconciliation)', warning$$1);
7648 }
7649}
7650
7651function startCommitTimer() {
7652 if (enableUserTimingAPI) {

Callers 1

renderRootFunction · 0.70

Calls 3

getComponentNameFunction · 0.70
pauseTimersFunction · 0.70
endMarkFunction · 0.70

Tested by

no test coverage detected