(wrapper, rawFn, nargs)
| 181 | // The `pointer` descriptor mirrors the raw function's so user code that |
| 182 | // reassigns `.pointer` keeps working through the wrapper. |
| 183 | function inheritMetadata(wrapper, rawFn, nargs) { |
| 184 | ObjectDefineProperty(wrapper, 'name', { |
| 185 | __proto__: null, value: rawFn.name, configurable: true, |
| 186 | }); |
| 187 | ObjectDefineProperty(wrapper, 'length', { |
| 188 | __proto__: null, value: nargs, configurable: true, |
| 189 | }); |
| 190 | ObjectDefineProperty(wrapper, 'pointer', { |
| 191 | __proto__: null, value: rawFn.pointer, |
| 192 | writable: true, configurable: true, enumerable: true, |
| 193 | }); |
| 194 | return wrapper; |
| 195 | } |
| 196 | |
| 197 | // Reentrancy: the ArrayBuffer is per-function, but `InvokeFunctionSB` copies |
| 198 | // arguments out of it into invocation-local storage before `ffi_call` and |
no outgoing calls
no test coverage detected
searching dependent graphs…