Lines Matching defs:args

352 void ContextifyContext::MakeContext(const FunctionCallbackInfo<Value>& args) {
353 Environment* env = Environment::GetCurrent(args);
355 CHECK_EQ(args.Length(), 6);
356 CHECK(args[0]->IsObject());
357 Local<Object> sandbox = args[0].As<Object>();
367 CHECK(args[1]->IsString());
368 options.name = args[1].As<String>();
370 CHECK(args[2]->IsString() || args[2]->IsUndefined());
371 if (args[2]->IsString()) {
372 options.origin = args[2].As<String>();
375 CHECK(args[3]->IsBoolean());
376 options.allow_code_gen_strings = args[3].As<Boolean>();
378 CHECK(args[4]->IsBoolean());
379 options.allow_code_gen_wasm = args[4].As<Boolean>();
381 if (args[5]->IsObject() &&
383 env->microtask_queue_ctor_template()->HasInstance(args[5])) {
385 Unwrap<MicrotaskQueueWrap>(args[5].As<Object>()));
400 void ContextifyContext::IsContext(const FunctionCallbackInfo<Value>& args) {
401 Environment* env = Environment::GetCurrent(args);
403 CHECK(args[0]->IsObject());
404 Local<Object> sandbox = args[0].As<Object>();
409 args.GetReturnValue().Set(result.FromJust());
434 ContextifyContext* ContextifyContext::Get(const PropertyCallbackInfo<T>& args) {
435 return Get(args.This());
458 const PropertyCallbackInfo<Value>& args) {
459 ContextifyContext* ctx = ContextifyContext::Get(args);
478 args.GetReturnValue().Set(rv);
486 const PropertyCallbackInfo<Value>& args) {
487 ContextifyContext* ctx = ContextifyContext::Get(args);
515 bool is_contextual_store = ctx->global_proxy() != args.This();
518 // on the sandbox in strict mode, i.e. args.ShouldThrowOnError() = true.
527 if (!is_declared && args.ShouldThrowOnError() && is_contextual_store &&
547 args.GetReturnValue().Set(value);
554 const PropertyCallbackInfo<Value>& args) {
555 ContextifyContext* ctx = ContextifyContext::Get(args);
567 args.GetReturnValue().Set(desc);
576 const PropertyCallbackInfo<Value>& args) {
577 ContextifyContext* ctx = ContextifyContext::Get(args);
636 const PropertyCallbackInfo<Boolean>& args) {
637 ContextifyContext* ctx = ContextifyContext::Get(args);
649 args.GetReturnValue().Set(false);
654 const PropertyCallbackInfo<Array>& args) {
655 ContextifyContext* ctx = ContextifyContext::Get(args);
665 args.GetReturnValue().Set(properties);
671 const PropertyCallbackInfo<Value>& args) {
672 ContextifyContext* ctx = ContextifyContext::Get(args);
678 Uint32ToName(ctx->context(), index), args);
685 const PropertyCallbackInfo<Value>& args) {
686 ContextifyContext* ctx = ContextifyContext::Get(args);
692 Uint32ToName(ctx->context(), index), value, args);
698 const PropertyCallbackInfo<Value>& args) {
699 ContextifyContext* ctx = ContextifyContext::Get(args);
705 Uint32ToName(ctx->context(), index), args);
712 const PropertyCallbackInfo<Value>& args) {
713 ContextifyContext* ctx = ContextifyContext::Get(args);
719 Uint32ToName(ctx->context(), index), desc, args);
725 const PropertyCallbackInfo<Boolean>& args) {
726 ContextifyContext* ctx = ContextifyContext::Get(args);
738 args.GetReturnValue().Set(false);
768 void ContextifyScript::New(const FunctionCallbackInfo<Value>& args) {
769 Environment* env = Environment::GetCurrent(args);
773 CHECK(args.IsConstructCall());
775 const int argc = args.Length();
778 CHECK(args[0]->IsString());
779 Local<String> code = args[0].As<String>();
781 CHECK(args[1]->IsString());
782 Local<String> filename = args[1].As<String>();
796 CHECK(args[2]->IsNumber());
797 line_offset = args[2].As<Int32>()->Value();
798 CHECK(args[3]->IsNumber());
799 column_offset = args[3].As<Int32>()->Value();
800 if (!args[4]->IsUndefined()) {
801 CHECK(args[4]->IsArrayBufferView());
802 cached_data_buf = args[4].As<ArrayBufferView>();
804 CHECK(args[5]->IsBoolean());
805 produce_cached_data = args[5]->IsTrue();
806 if (!args[6]->IsUndefined()) {
807 CHECK(args[6]->IsObject());
810 env, args[6].As<Object>());
814 CHECK(args[7]->IsSymbol());
815 id_symbol = args[7].As<Symbol>();
819 new ContextifyScript(env, args.This());
894 args.This(),
903 if (args.This()
964 const FunctionCallbackInfo<Value>& args) {
965 Environment* env = Environment::GetCurrent(args);
967 ASSIGN_OR_RETURN_UNWRAP(&wrapped_script, args.Holder());
973 args.GetReturnValue().Set(Buffer::New(env, 0).ToLocalChecked());
979 args.GetReturnValue().Set(buf.ToLocalChecked());
983 void ContextifyScript::RunInContext(const FunctionCallbackInfo<Value>& args) {
984 Environment* env = Environment::GetCurrent(args);
987 ASSIGN_OR_RETURN_UNWRAP(&wrapped_script, args.Holder());
989 CHECK_EQ(args.Length(), 5);
990 CHECK(args[0]->IsObject() || args[0]->IsNull());
995 if (args[0]->IsObject()) {
996 Local<Object> sandbox = args[0].As<Object>();
1013 CHECK(args[1]->IsNumber());
1014 int64_t timeout = args[1]->IntegerValue(env->context()).FromJust();
1016 CHECK(args[2]->IsBoolean());
1017 bool display_errors = args[2]->IsTrue();
1019 CHECK(args[3]->IsBoolean());
1020 bool break_on_sigint = args[3]->IsTrue();
1022 CHECK(args[4]->IsBoolean());
1023 bool break_on_first_line = args[4]->IsTrue();
1033 args);
1043 const FunctionCallbackInfo<Value>& args) {
1048 if (!ContextifyScript::InstanceOf(env, args.Holder())) {
1058 ASSIGN_OR_RETURN_UNWRAP(&wrapped_script, args.Holder(), false);
1124 args.GetReturnValue().Set(result.ToLocalChecked());
1137 const FunctionCallbackInfo<Value>& args) {
1138 Environment* env = Environment::GetCurrent(args);
1143 CHECK(args[0]->IsString());
1144 Local<String> code = args[0].As<String>();
1147 CHECK(args[1]->IsString());
1148 Local<String> filename = args[1].As<String>();
1151 CHECK(args[2]->IsNumber());
1152 int line_offset = args[2].As<Int32>()->Value();
1155 CHECK(args[3]->IsNumber());
1156 int column_offset = args[3].As<Int32>()->Value();
1160 if (!args[4]->IsUndefined()) {
1161 CHECK(args[4]->IsArrayBufferView());
1162 cached_data_buf = args[4].As<ArrayBufferView>();
1166 CHECK(args[5]->IsBoolean());
1167 bool produce_cached_data = args[5]->IsTrue();
1171 if (!args[6]->IsUndefined()) {
1172 CHECK(args[6]->IsObject());
1175 env, args[6].As<Object>());
1184 if (!args[7]->IsUndefined()) {
1185 CHECK(args[7]->IsArray());
1186 context_extensions_buf = args[7].As<Array>();
1191 if (!args[8]->IsUndefined()) {
1192 CHECK(args[8]->IsArray());
1193 params_buf = args[8].As<Array>();
1197 CHECK(args[9]->IsSymbol());
1198 Local<Symbol> id_symbol = args[9].As<Symbol>();
1306 args.GetReturnValue().Set(result);
1309 static void StartSigintWatchdog(const FunctionCallbackInfo<Value>& args) {
1311 args.GetReturnValue().Set(ret == 0);
1314 static void StopSigintWatchdog(const FunctionCallbackInfo<Value>& args) {
1316 args.GetReturnValue().Set(had_pending_signals);
1319 static void WatchdogHasPendingSigint(const FunctionCallbackInfo<Value>& args) {
1321 args.GetReturnValue().Set(ret);
1324 static void MeasureMemory(const FunctionCallbackInfo<Value>& args) {
1325 CHECK(args[0]->IsInt32());
1326 CHECK(args[1]->IsInt32());
1327 int32_t mode = args[0].As<v8::Int32>()->Value();
1328 int32_t execution = args[1].As<v8::Int32>()->Value();
1329 Isolate* isolate = args.GetIsolate();
1344 args.GetReturnValue().Set(promise);
1359 void MicrotaskQueueWrap::New(const FunctionCallbackInfo<Value>& args) {
1360 CHECK(args.IsConstructCall());
1361 new MicrotaskQueueWrap(Environment::GetCurrent(args), args.This());