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

Function stopWorkLoopTimer

code/new-context-api/public/app.js:7116–7137  ·  view source on GitHub ↗
(interruptedBy)

Source from the content-addressed store, hash-verified

7114}
7115
7116function stopWorkLoopTimer(interruptedBy) {
7117 if (enableUserTimingAPI) {
7118 if (!supportsUserTiming) {
7119 return;
7120 }
7121 var warning$$1 = null;
7122 if (interruptedBy !== null) {
7123 if (interruptedBy.tag === HostRoot) {
7124 warning$$1 = 'A top-level update interrupted the previous render';
7125 } else {
7126 var componentName = getComponentName(interruptedBy) || 'Unknown';
7127 warning$$1 = 'An update to ' + componentName + ' interrupted the previous render';
7128 }
7129 } else if (commitCountInCurrentWorkLoop > 1) {
7130 warning$$1 = 'There were cascading updates';
7131 }
7132 commitCountInCurrentWorkLoop = 0;
7133 // Pause any measurements until the next loop.
7134 pauseTimers();
7135 endMark('(React Tree Reconciliation)', '(React Tree Reconciliation)', warning$$1);
7136 }
7137}
7138
7139function startCommitTimer() {
7140 if (enableUserTimingAPI) {

Callers 1

renderRootFunction · 0.70

Calls 3

getComponentNameFunction · 0.70
pauseTimersFunction · 0.70
endMarkFunction · 0.70

Tested by

no test coverage detected