| 114 | template<typename T> |
| 115 | template<bool isFirstPass> |
| 116 | void |
| 117 | WeakCallbackInfo<T>::invokeparameter(NAN_WEAK_PARAMETER_CALLBACK_SIG_ data) { |
| 118 | WeakCallbackInfo<T> *cbinfo = unwrapparameter(data); |
| 119 | if (isFirstPass) { |
| 120 | cbinfo->persistent_.Reset(); |
| 121 | data.SetSecondPassCallback(invokeparameter<false>); |
| 122 | } else { |
| 123 | cbinfo->callback_(*cbinfo); |
| 124 | delete cbinfo; |
| 125 | } |
| 126 | } |
| 127 | |
| 128 | template<typename T> |
| 129 | template<bool isFirstPass> |