MCPcopy Create free account
hub / github.com/reactjs/react-rails / stopWorkLoopTimer

Function stopWorkLoopTimer

lib/assets/react-source/development/react.js:14193–14218  ·  view source on GitHub ↗
(interruptedBy, didCompleteRoot)

Source from the content-addressed store, hash-verified

14191 }
14192 }
14193 function stopWorkLoopTimer(interruptedBy, didCompleteRoot) {
14194 {
14195 if (!supportsUserTiming) {
14196 return;
14197 }
14198
14199 var warning = null;
14200
14201 if (interruptedBy !== null) {
14202 if (interruptedBy.tag === HostRoot) {
14203 warning = 'A top-level update interrupted the previous render';
14204 } else {
14205 var componentName = getComponentName(interruptedBy.type) || 'Unknown';
14206 warning = "An update to " + componentName + " interrupted the previous render";
14207 }
14208 } else if (commitCountInCurrentWorkLoop > 1) {
14209 warning = 'There were cascading updates';
14210 }
14211
14212 commitCountInCurrentWorkLoop = 0;
14213 var label = didCompleteRoot ? '(React Tree Reconciliation: Completed Root)' : '(React Tree Reconciliation: Yielded)'; // Pause any measurements until the next loop.
14214
14215 pauseTimers();
14216 endMark(label, '(React Tree Reconciliation)', warning);
14217 }
14218 }
14219 function startCommitTimer() {
14220 {
14221 if (!supportsUserTiming) {

Callers 2

Calls 3

pauseTimersFunction · 0.85
endMarkFunction · 0.85
getComponentNameFunction · 0.70

Tested by

no test coverage detected