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

Function stopWorkLoopTimer

code/dependency-injection/public/app.js:7848–7869  ·  view source on GitHub ↗
(interruptedBy)

Source from the content-addressed store, hash-verified

7846}
7847
7848function stopWorkLoopTimer(interruptedBy) {
7849 if (enableUserTimingAPI) {
7850 if (!supportsUserTiming) {
7851 return;
7852 }
7853 var warning$$1 = null;
7854 if (interruptedBy !== null) {
7855 if (interruptedBy.tag === HostRoot) {
7856 warning$$1 = 'A top-level update interrupted the previous render';
7857 } else {
7858 var componentName = getComponentName(interruptedBy) || 'Unknown';
7859 warning$$1 = 'An update to ' + componentName + ' interrupted the previous render';
7860 }
7861 } else if (commitCountInCurrentWorkLoop > 1) {
7862 warning$$1 = 'There were cascading updates';
7863 }
7864 commitCountInCurrentWorkLoop = 0;
7865 // Pause any measurements until the next loop.
7866 pauseTimers();
7867 endMark('(React Tree Reconciliation)', '(React Tree Reconciliation)', warning$$1);
7868 }
7869}
7870
7871function startCommitTimer() {
7872 if (enableUserTimingAPI) {

Callers 1

renderRootFunction · 0.70

Calls 3

getComponentNameFunction · 0.70
pauseTimersFunction · 0.70
endMarkFunction · 0.70

Tested by

no test coverage detected