@@ -49,16 +49,14 @@ void JSIMP(ffi_cif *cif, void *ret, void *args[], void *data) {
4949
5050 napi_value argv[cif->nargs - 2 ];
5151 for (int i = 2 ; i < cif->nargs ; i++) {
52- argv[i - 2 ] = closure->argTypes [i]->toJS (env, args[i], kBlockParam );
52+ argv[i - 2 ] = closure->argTypes [i]->toJS (env, args[i], 0 );
5353 }
5454
5555 // Clear any pending exceptions before calling the function.
5656 napi_get_and_clear_last_exception (env, &result);
5757
58- auto pool = objc_autoreleasePoolPush ();
5958 napi_status status =
6059 napi_call_function (env, thisArg, func, cif->nargs - 2 , argv, &result);
61- objc_autoreleasePoolPop (pool);
6260
6361 bool shouldFree;
6462 closure->returnType ->toNative (env, result, ret, &shouldFree, &shouldFree);
@@ -100,16 +98,14 @@ void callJSBlockFromMainThread(napi_env env, napi_value js_cb, void *context,
10098
10199 napi_value argv[ctx->cif->nargs - 1 ];
102100 for (int i = 0 ; i < ctx->cif ->nargs - 1 ; i++) {
103- argv[i] = closure->argTypes [i]->toJS (env, ctx->args [i + 1 ], kBlockParam );
101+ argv[i] = closure->argTypes [i]->toJS (env, ctx->args [i + 1 ], 0 );
104102 }
105103
106104 // Clear any pending exceptions before calling the function.
107105 napi_get_and_clear_last_exception (env, &result);
108106
109- auto pool = objc_autoreleasePoolPush ();
110107 napi_status status = napi_call_function (env, thisArg, func,
111108 ctx->cif ->nargs - 1 , argv, &result);
112- objc_autoreleasePoolPop (pool);
113109
114110 bool shouldFree;
115111 closure->returnType ->toNative (env, result, ctx->ret , &shouldFree,
0 commit comments