| 5042 | |
| 5043 | // Used to store ancestor hierarchy in top level callback |
| 5044 | function getTopLevelCallbackBookKeeping(topLevelType, nativeEvent, targetInst) { |
| 5045 | if (callbackBookkeepingPool.length) { |
| 5046 | var instance = callbackBookkeepingPool.pop(); |
| 5047 | instance.topLevelType = topLevelType; |
| 5048 | instance.nativeEvent = nativeEvent; |
| 5049 | instance.targetInst = targetInst; |
| 5050 | return instance; |
| 5051 | } |
| 5052 | return { |
| 5053 | topLevelType: topLevelType, |
| 5054 | nativeEvent: nativeEvent, |
| 5055 | targetInst: targetInst, |
| 5056 | ancestors: [] |
| 5057 | }; |
| 5058 | } |
| 5059 | |
| 5060 | function releaseTopLevelCallbackBookKeeping(instance) { |
| 5061 | instance.topLevelType = null; |