MCPcopy Create free account
hub / github.com/microsoft/SandDance / unstable_wrapCallback

Function unstable_wrapCallback

docs/external/js/react.development.js:2718–2731  ·  view source on GitHub ↗
(callback)

Source from the content-addressed store, hash-verified

2716 }
2717
2718 function unstable_wrapCallback(callback) {
2719 var parentPriorityLevel = currentPriorityLevel;
2720 return function () {
2721 // This is a fork of runWithPriority, inlined for performance.
2722 var previousPriorityLevel = currentPriorityLevel;
2723 currentPriorityLevel = parentPriorityLevel;
2724
2725 try {
2726 return callback.apply(this, arguments);
2727 } finally {
2728 currentPriorityLevel = previousPriorityLevel;
2729 }
2730 };
2731 }
2732
2733 function timeoutForPriorityLevel(priorityLevel) {
2734 switch (priorityLevel) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected