| 6060 | |
| 6061 | // Used to store ancestor hierarchy in top level callback |
| 6062 | function getTopLevelCallbackBookKeeping(topLevelType, nativeEvent, targetInst) { |
| 6063 | if (callbackBookkeepingPool.length) { |
| 6064 | var instance = callbackBookkeepingPool.pop(); |
| 6065 | instance.topLevelType = topLevelType; |
| 6066 | instance.nativeEvent = nativeEvent; |
| 6067 | instance.targetInst = targetInst; |
| 6068 | return instance; |
| 6069 | } |
| 6070 | return { |
| 6071 | topLevelType: topLevelType, |
| 6072 | nativeEvent: nativeEvent, |
| 6073 | targetInst: targetInst, |
| 6074 | ancestors: [] |
| 6075 | }; |
| 6076 | } |
| 6077 | |
| 6078 | function releaseTopLevelCallbackBookKeeping(instance) { |
| 6079 | instance.topLevelType = null; |