@@ -167,16 +167,15 @@ class BindingData final
|
167 | 167 | |
168 | 168 | // Installs the set of JavaScript callback functions that are used to |
169 | 169 | // bridge out to the JS API. |
170 | | -static void SetCallbacks(const v8::FunctionCallbackInfo<v8::Value>& args); |
| 170 | +JS_METHOD(SetCallbacks); |
| 171 | + |
| 172 | +// Purge the packet free list to free up memory. |
| 173 | +JS_METHOD(FlushPacketFreelist); |
171 | 174 | |
172 | 175 | std::vector<BaseObjectPtr<BaseObject>> packet_freelist; |
173 | 176 | |
174 | 177 | std::unordered_map<Endpoint*, BaseObjectPtr<BaseObject>> listening_endpoints; |
175 | 178 | |
176 | | -// Purge the packet free list to free up memory. |
177 | | -static void FlushPacketFreelist( |
178 | | -const v8::FunctionCallbackInfo<v8::Value>& args); |
179 | | - |
180 | 179 | bool in_ngtcp2_callback_scope = false; |
181 | 180 | bool in_nghttp3_callback_scope = false; |
182 | 181 | size_t current_ngtcp2_memory_ = 0; |
@@ -223,7 +222,7 @@ class BindingData final
|
223 | 222 | #undef V |
224 | 223 | }; |
225 | 224 | |
226 | | -void IllegalConstructor(const v8::FunctionCallbackInfo<v8::Value>& args); |
| 225 | +JS_METHOD_IMPL(IllegalConstructor); |
227 | 226 | |
228 | 227 | // The ngtcp2 and nghttp3 callbacks have certain restrictions |
229 | 228 | // that forbid re-entry. We provide the following scopes for |
|