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

Function stopWorkLoopTimer

code/event-handlers/public/app.js:7085–7106  ·  view source on GitHub ↗
(interruptedBy)

Source from the content-addressed store, hash-verified

7083}
7084
7085function stopWorkLoopTimer(interruptedBy) {
7086 if (enableUserTimingAPI) {
7087 if (!supportsUserTiming) {
7088 return;
7089 }
7090 var warning$$1 = null;
7091 if (interruptedBy !== null) {
7092 if (interruptedBy.tag === HostRoot) {
7093 warning$$1 = 'A top-level update interrupted the previous render';
7094 } else {
7095 var componentName = getComponentName(interruptedBy) || 'Unknown';
7096 warning$$1 = 'An update to ' + componentName + ' interrupted the previous render';
7097 }
7098 } else if (commitCountInCurrentWorkLoop > 1) {
7099 warning$$1 = 'There were cascading updates';
7100 }
7101 commitCountInCurrentWorkLoop = 0;
7102 // Pause any measurements until the next loop.
7103 pauseTimers();
7104 endMark('(React Tree Reconciliation)', '(React Tree Reconciliation)', warning$$1);
7105 }
7106}
7107
7108function startCommitTimer() {
7109 if (enableUserTimingAPI) {

Callers 1

renderRootFunction · 0.70

Calls 3

getComponentNameFunction · 0.70
pauseTimersFunction · 0.70
endMarkFunction · 0.70

Tested by

no test coverage detected