Lines Matching defs:preopens
209 Local<Array> preopens = args[2].As<Array>();
210 CHECK_EQ(preopens->Length() % 2, 0);
211 options.preopenc = preopens->Length() / 2;
212 options.preopens = Calloc<uvwasi_preopen_t>(options.preopenc);
214 for (uint32_t i = 0; i < preopens->Length(); i += 2) {
215 auto mapped = preopens->Get(context, i).ToLocalChecked();
216 auto real = preopens->Get(context, i + 1).ToLocalChecked();
221 options.preopens[index].mapped_path = strdup(*mapped_path);
222 CHECK_NOT_NULL(options.preopens[index].mapped_path);
223 options.preopens[index].real_path = strdup(*real_path);
224 CHECK_NOT_NULL(options.preopens[index].real_path);
240 if (options.preopens != nullptr) {
242 free(const_cast<char*>(options.preopens[i].mapped_path));
243 free(const_cast<char*>(options.preopens[i].real_path));
246 free(options.preopens);