| 5947 | |
| 5948 | // Used to store ancestor hierarchy in top level callback |
| 5949 | function getTopLevelCallbackBookKeeping(topLevelType, nativeEvent, targetInst) { |
| 5950 | if (callbackBookkeepingPool.length) { |
| 5951 | var instance = callbackBookkeepingPool.pop(); |
| 5952 | instance.topLevelType = topLevelType; |
| 5953 | instance.nativeEvent = nativeEvent; |
| 5954 | instance.targetInst = targetInst; |
| 5955 | return instance; |
| 5956 | } |
| 5957 | return { |
| 5958 | topLevelType: topLevelType, |
| 5959 | nativeEvent: nativeEvent, |
| 5960 | targetInst: targetInst, |
| 5961 | ancestors: [] |
| 5962 | }; |
| 5963 | } |
| 5964 | |
| 5965 | function releaseTopLevelCallbackBookKeeping(instance) { |
| 5966 | instance.topLevelType = null; |