Lines Matching defs:args

106 void ModuleWrap::New(const FunctionCallbackInfo<Value>& args) {
107 CHECK(args.IsConstructCall());
108 CHECK_GE(args.Length(), 3);
110 Environment* env = Environment::GetCurrent(args);
113 Local<Object> that = args.This();
115 CHECK(args[0]->IsString());
116 Local<String> url = args[0].As<String>();
120 if (args[1]->IsUndefined()) {
123 CHECK(args[1]->IsObject());
125 env, args[1].As<Object>());
133 bool synthetic = args[2]->IsArray();
136 CHECK(args[3]->IsFunction());
139 CHECK(args[2]->IsString());
140 CHECK(args[3]->IsNumber());
141 line_offset = args[3].As<Int32>()->Value();
142 CHECK(args[4]->IsNumber());
143 column_offset = args[4].As<Int32>()->Value();
159 CHECK(args[2]->IsArray());
160 Local<Array> export_names_arr = args[2].As<Array>();
175 if (!args[5]->IsUndefined()) {
176 CHECK(args[5]->IsArrayBufferView());
177 Local<ArrayBufferView> cached_data_buf = args[5].As<ArrayBufferView>();
185 Local<String> source_text = args[2].As<String>();
239 synthetic ? args[3] : Undefined(env->isolate()).As<v8::Value>();
249 args.GetReturnValue().Set(that);
271 void ModuleWrap::Link(const FunctionCallbackInfo<Value>& args) {
272 Environment* env = Environment::GetCurrent(args);
273 Isolate* isolate = args.GetIsolate();
275 CHECK_EQ(args.Length(), 1);
276 CHECK(args[0]->IsFunction());
278 Local<Object> that = args.This();
287 Local<Function> resolver_arg = args[0].As<Function>();
331 args.GetReturnValue().Set(
335 void ModuleWrap::Instantiate(const FunctionCallbackInfo<Value>& args) {
336 Environment* env = Environment::GetCurrent(args);
337 Isolate* isolate = args.GetIsolate();
339 ASSIGN_OR_RETURN_UNWRAP(&obj, args.This());
358 void ModuleWrap::Evaluate(const FunctionCallbackInfo<Value>& args) {
359 Environment* env = Environment::GetCurrent(args);
362 ASSIGN_OR_RETURN_UNWRAP(&obj, args.This());
372 CHECK_EQ(args.Length(), 2);
374 CHECK(args[0]->IsNumber());
375 int64_t timeout = args[0]->IntegerValue(env->context()).FromJust();
377 CHECK(args[1]->IsBoolean());
378 bool break_on_sigint = args[1]->IsTrue();
432 args.GetReturnValue().Set(result.ToLocalChecked());
435 void ModuleWrap::GetNamespace(const FunctionCallbackInfo<Value>& args) {
436 Environment* env = Environment::GetCurrent(args);
437 Isolate* isolate = args.GetIsolate();
439 ASSIGN_OR_RETURN_UNWRAP(&obj, args.This());
458 args.GetReturnValue().Set(result);
461 void ModuleWrap::GetStatus(const FunctionCallbackInfo<Value>& args) {
462 Isolate* isolate = args.GetIsolate();
464 ASSIGN_OR_RETURN_UNWRAP(&obj, args.This());
468 args.GetReturnValue().Set(module->GetStatus());
472 const FunctionCallbackInfo<Value>& args) {
473 Environment* env = Environment::GetCurrent(args);
475 ASSIGN_OR_RETURN_UNWRAP(&obj, args.This());
490 args.GetReturnValue().Set(
494 void ModuleWrap::GetError(const FunctionCallbackInfo<Value>& args) {
495 Isolate* isolate = args.GetIsolate();
497 ASSIGN_OR_RETURN_UNWRAP(&obj, args.This());
500 args.GetReturnValue().Set(module->GetException());
612 const FunctionCallbackInfo<Value>& args) {
613 Isolate* isolate = args.GetIsolate();
614 Environment* env = Environment::GetCurrent(args);
617 CHECK_EQ(args.Length(), 1);
618 CHECK(args[0]->IsFunction());
619 Local<Function> import_callback = args[0].As<Function>();
645 Local<Value> args[] = {id, meta};
648 context, Undefined(env->isolate()), arraysize(args), args));
655 const FunctionCallbackInfo<Value>& args) {
656 Environment* env = Environment::GetCurrent(args);
659 CHECK_EQ(args.Length(), 1);
660 CHECK(args[0]->IsFunction());
661 Local<Function> import_meta_callback = args[0].As<Function>();
704 void ModuleWrap::SetSyntheticExport(const FunctionCallbackInfo<Value>& args) {
705 Isolate* isolate = args.GetIsolate();
706 Local<Object> that = args.This();
713 CHECK_EQ(args.Length(), 2);
715 CHECK(args[0]->IsString());
716 Local<String> export_name = args[0].As<String>();
718 Local<Value> export_value = args[1];
724 void ModuleWrap::CreateCachedData(const FunctionCallbackInfo<Value>& args) {
725 Isolate* isolate = args.GetIsolate();
726 Local<Object> that = args.This();
741 Environment* env = Environment::GetCurrent(args);
743 args.GetReturnValue().Set(Buffer::New(env, 0).ToLocalChecked());
749 args.GetReturnValue().Set(buf.ToLocalChecked());