| /third_party/node/src/api/ |
| D | exceptions.cc | 16 using v8::Isolate; 23 Local<Value> ErrnoException(Isolate* isolate, in ErrnoException() argument 28 Environment* env = Environment::GetCurrent(isolate); in ErrnoException() 32 Local<String> estring = OneByteString(isolate, errors::errno_string(errorno)); in ErrnoException() 36 Local<String> message = OneByteString(isolate, msg); in ErrnoException() 39 String::Concat(isolate, estring, FIXED_ONE_BYTE_STRING(isolate, ", ")); in ErrnoException() 40 cons = String::Concat(isolate, cons, message); in ErrnoException() 45 path_string = String::NewFromUtf8(isolate, path, NewStringType::kNormal) in ErrnoException() 50 cons = String::Concat(isolate, cons, FIXED_ONE_BYTE_STRING(isolate, " '")); in ErrnoException() 51 cons = String::Concat(isolate, cons, path_string); in ErrnoException() [all …]
|
| D | environment.cc | 23 using v8::Isolate; 41 bool ShouldAbortOnUncaughtException(Isolate* isolate) { in ShouldAbortOnUncaughtException() argument 42 DebugSealHandleScope scope(isolate); in ShouldAbortOnUncaughtException() 43 Environment* env = Environment::GetCurrent(isolate); in ShouldAbortOnUncaughtException() 73 context, Undefined(env->isolate()), arraysize(args), args); in PrepareStackTraceCallback() 212 void SetIsolateCreateParamsForNode(Isolate::CreateParams* params) { in SetIsolateCreateParamsForNode() 225 void SetIsolateErrorHandlers(v8::Isolate* isolate, const IsolateSettings& s) { in SetIsolateErrorHandlers() argument 227 isolate->AddMessageListenerWithErrorLevel( in SetIsolateErrorHandlers() 229 Isolate::MessageErrorLevel::kMessageError | in SetIsolateErrorHandlers() 230 Isolate::MessageErrorLevel::kMessageWarning); in SetIsolateErrorHandlers() [all …]
|
| D | hooks.cc | 11 using v8::Isolate; 38 HandleScope handle_scope(env->isolate()); in EmitBeforeExit() 55 HandleScope handle_scope(env->isolate()); in EmitExit() 60 FIXED_ONE_BYTE_STRING(env->isolate(), "_exiting"), in EmitExit() 61 True(env->isolate())) in EmitExit() 69 ProcessEmit(env, "exit", Integer::New(env->isolate(), code)); in EmitExit() 105 void AddEnvironmentCleanupHook(Isolate* isolate, in AddEnvironmentCleanupHook() argument 108 Environment* env = Environment::GetCurrent(isolate); in AddEnvironmentCleanupHook() 113 void RemoveEnvironmentCleanupHook(Isolate* isolate, in RemoveEnvironmentCleanupHook() argument 116 Environment* env = Environment::GetCurrent(isolate); in RemoveEnvironmentCleanupHook() [all …]
|
| D | callback.cc | 12 using v8::Isolate; 21 CallbackScope::CallbackScope(Isolate* isolate, in CallbackScope() argument 24 : private_(new InternalCallbackScope(Environment::GetCurrent(isolate), in CallbackScope() 27 try_catch_(isolate) { in CallbackScope() 61 HandleScope handle_scope(env->isolate()); in InternalCallbackScope() 63 CHECK_EQ(Environment::GetCurrent(env->isolate()), env); in InternalCallbackScope() 115 MicrotasksScope::PerformCheckpoint(env_->isolate()); in Close() 131 HandleScope handle_scope(env_->isolate()); in Close() 184 args[0] = v8::Number::New(env->isolate(), asyncContext.async_id); in InternalMakeCallback() 210 MaybeLocal<Value> MakeCallback(Isolate* isolate, in MakeCallback() argument [all …]
|
| D | async_resource.cc | 7 using v8::Isolate; 14 AsyncResource::AsyncResource(Isolate* isolate, in AsyncResource() argument 18 : env_(Environment::GetCurrent(isolate)), in AsyncResource() 19 resource_(isolate, resource) { in AsyncResource() 21 async_context_ = EmitAsyncInit(isolate, resource, name, in AsyncResource() 32 return node::MakeCallback(env_->isolate(), get_resource(), in MakeCallback() 40 return node::MakeCallback(env_->isolate(), get_resource(), in MakeCallback() 48 return node::MakeCallback(env_->isolate(), get_resource(), in MakeCallback() 54 return resource_.Get(env_->isolate()); in get_resource() 65 // TODO(addaleax): We shouldn’t need to use env_->isolate() if we’re just going [all …]
|
| /third_party/node/src/ |
| D | node_env_var.cc | 13 using v8::Isolate; 31 MaybeLocal<String> Get(Isolate* isolate, Local<String> key) const override; 33 void Set(Isolate* isolate, Local<String> key, Local<String> value) override; 34 int32_t Query(Isolate* isolate, Local<String> key) const override; 36 void Delete(Isolate* isolate, Local<String> key) override; 37 Local<Array> Enumerate(Isolate* isolate) const override; 42 MaybeLocal<String> Get(Isolate* isolate, Local<String> key) const override; 44 void Set(Isolate* isolate, Local<String> key, Local<String> value) override; 45 int32_t Query(Isolate* isolate, Local<String> key) const override; 47 void Delete(Isolate* isolate, Local<String> key) override; [all …]
|
| D | module_wrap.cc | 36 using v8::Isolate; 57 module_(env->isolate(), module), in ModuleWrap() 58 url_(env->isolate(), url), in ModuleWrap() 64 HandleScope scope(env()->isolate()); in ~ModuleWrap() 65 Local<Module> module = module_.Get(env()->isolate()); in ~ModuleWrap() 102 Isolate* isolate = env->isolate(); in New() local 138 PrimitiveArray::New(isolate, HostDefinedOptions::kLength); in New() 139 host_defined_options->Set(isolate, HostDefinedOptions::kType, in New() 140 Number::New(isolate, ScriptType::kModule)); in New() 162 module = Module::CreateSyntheticModule(isolate, url, export_names, in New() [all …]
|
| D | node.h | 124 NODE_EXTERN v8::Local<v8::Value> ErrnoException(v8::Isolate* isolate, 129 NODE_EXTERN v8::Local<v8::Value> UVException(v8::Isolate* isolate, 136 NODE_DEPRECATED("Use ErrnoException(isolate, ...)", 142 return ErrnoException(v8::Isolate::GetCurrent(), 149 NODE_DEPRECATED("Use UVException(isolate, ...)", 154 return UVException(v8::Isolate::GetCurrent(), 170 v8::Isolate* isolate, 177 v8::Isolate* isolate, 184 v8::Isolate* isolate, 285 virtual bool FlushForegroundTasks(v8::Isolate* isolate) = 0; [all …]
|
| D | node_errors.h | 27 // `node::ERR_INVALID_ARG_TYPE(isolate, "message")` returning 65 inline v8::Local<v8::Value> code(v8::Isolate* isolate, \ 67 v8::Local<v8::String> js_code = OneByteString(isolate, #code); \ 68 v8::Local<v8::String> js_msg = OneByteString(isolate, message); \ 71 isolate->GetCurrentContext()).ToLocalChecked(); \ 72 e->Set(isolate->GetCurrentContext(), OneByteString(isolate, "code"), \ 76 inline void THROW_ ## code(v8::Isolate* isolate, const char* message) { \ 77 isolate->ThrowException(code(isolate, message)); \ 80 THROW_ ## code(env->isolate(), message); \ 125 inline v8::Local<v8::Value> code(v8::Isolate* isolate) { \ [all …]
|
| D | string_bytes.cc | 43 using v8::Isolate; 59 isolate()->AdjustAmountOfExternalAllocatedMemory(-byte_length()); in ~ExternString() 74 static MaybeLocal<Value> NewFromCopy(Isolate* isolate, in NewFromCopy() argument 79 return String::Empty(isolate); in NewFromCopy() 82 return NewSimpleFromCopy(isolate, data, length, error); in NewFromCopy() 86 *error = node::ERR_MEMORY_ALLOCATION_FAILED(isolate); in NewFromCopy() 91 return ExternString<ResourceType, TypeName>::New(isolate, in NewFromCopy() 98 static MaybeLocal<Value> New(Isolate* isolate, in New() argument 103 return String::Empty(isolate); in New() 106 MaybeLocal<Value> str = NewSimpleFromCopy(isolate, data, length, error); in New() [all …]
|
| D | node_platform.h | 52 // This acts as the foreground task runner for a given Isolate. 57 PerIsolatePlatformData(v8::Isolate* isolate, uv_loop_t* loop); 101 v8::Isolate* const isolate_; 142 void DrainTasks(v8::Isolate* isolate) override; 150 void CallOnForegroundThread(v8::Isolate* isolate, v8::Task* task) override { in CallOnForegroundThread() argument 153 void CallDelayedOnForegroundThread(v8::Isolate* isolate, in CallDelayedOnForegroundThread() argument 158 bool IdleTasksEnabled(v8::Isolate* isolate) override; 162 bool FlushForegroundTasks(v8::Isolate* isolate) override; 164 void RegisterIsolate(v8::Isolate* isolate, uv_loop_t* loop) override; 165 void UnregisterIsolate(v8::Isolate* isolate) override; [all …]
|
| D | node_main_instance.h | 20 // To create a main instance that does not own the isolate, 23 // Isolate* isolate = Isolate::Allocate(); 24 // platform->RegisterIsolate(isolate, loop); 25 // isolate->Initialize(...); 26 // isolate->Enter(); 28 // NodeMainInstance::Create(isolate, loop, args, exec_args); 32 // main_instance->Cleanup(); // While the isolate is entered 33 // isolate->Exit(); 34 // isolate->Dispose(); 35 // platform->UnregisterIsolate(isolate); [all …]
|
| D | node_native_module_env.cc | 12 using v8::Isolate; 26 Isolate* isolate = context->GetIsolate(); in ToJsSet() local 27 Local<Set> out = Set::New(isolate); in ToJsSet() 29 out->Add(context, OneByteString(isolate, x.c_str(), x.size())) in ToJsSet() 47 Local<String> NativeModuleEnv::GetConfigString(Isolate* isolate) { in GetConfigString() argument 48 return NativeModuleLoader::GetInstance()->GetConfigString(isolate); in GetConfigString() 54 Isolate* isolate = env->isolate(); in GetModuleCategories() local 56 Local<Object> result = Object::New(isolate); in GetModuleCategories() 71 OneByteString(isolate, "cannotBeRequired"), in GetModuleCategories() 76 OneByteString(isolate, "canBeRequired"), in GetModuleCategories() [all …]
|
| D | node_v8.cc | 37 using v8::Isolate; 92 Integer::NewFromUnsigned(env->isolate(), in CachedDataVersionTag() 101 env->isolate()->GetHeapStatistics(&s); in UpdateHeapStatisticsArrayBuffer() 112 Isolate* const isolate = env->isolate(); in UpdateHeapSpaceStatisticsBuffer() local 114 size_t number_of_heap_spaces = env->isolate()->NumberOfHeapSpaces(); in UpdateHeapSpaceStatisticsBuffer() 117 isolate->GetHeapSpaceStatistics(&s, i); in UpdateHeapSpaceStatisticsBuffer() 131 env->isolate()->GetHeapCodeAndMetadataStatistics(&s); in UpdateHeapCodeStatisticsArrayBuffer() 166 FIXED_ONE_BYTE_STRING(env->isolate(), in Initialize() 168 ArrayBuffer::New(env->isolate(), in Initialize() 174 FIXED_ONE_BYTE_STRING(env->isolate(), #name), \ in Initialize() [all …]
|
| D | node_task_queue.cc | 17 using v8::Isolate; 36 Isolate* isolate = promise->GetIsolate(); in PromiseRejectCallback() local 39 Environment* env = Environment::GetCurrent(isolate); in PromiseRejectCallback() 49 Local<Value> type = Number::New(env->isolate(), event); in PromiseRejectCallback() 59 value = Undefined(isolate); in PromiseRejectCallback() 74 value = Undefined(isolate); in PromiseRejectCallback() 84 env->context(), Undefined(isolate), arraysize(args), args)); in PromiseRejectCallback() 87 PrintCaughtException(isolate, env->context(), try_catch); in PromiseRejectCallback() 94 Isolate* isolate = env->isolate(); in EnqueueMicrotask() local 98 isolate->EnqueueMicrotask(args[0].As<Function>()); in EnqueueMicrotask() [all …]
|
| D | node_worker.cc | 26 using v8::Isolate; 76 Number::New(env->isolate(), static_cast<double>(thread_id_.id))) in Worker() 145 Isolate::CreateParams params; in WorkerThreadData() 151 Isolate* isolate = Isolate::Allocate(); in WorkerThreadData() local 152 if (isolate == nullptr) { in WorkerThreadData() 155 w->Exit(1, "ERR_WORKER_OUT_OF_MEMORY", "Failed to create new Isolate"); in WorkerThreadData() 159 w->platform_->RegisterIsolate(isolate, &loop_); in WorkerThreadData() 160 Isolate::Initialize(isolate, params); in WorkerThreadData() 161 SetIsolateUpForNode(isolate); in WorkerThreadData() 163 isolate->AddNearHeapLimitCallback(Worker::NearHeapLimit, w); in WorkerThreadData() [all …]
|
| /third_party/node/test/addons/async-hello-world/ |
| D | binding.cc | 16 v8::Isolate* isolate; member 35 v8::Isolate* isolate = req->isolate; in AfterAsync() local 36 v8::HandleScope scope(isolate); in AfterAsync() 39 v8::Null(isolate), in AfterAsync() 40 v8::Integer::New(isolate, req->output) in AfterAsync() 43 v8::TryCatch try_catch(isolate); in AfterAsync() 45 v8::Local<v8::Object> global = isolate->GetCurrentContext()->Global(); in AfterAsync() 47 v8::Local<v8::Function>::New(isolate, req->callback); in AfterAsync() 51 node::MakeCallback(isolate, global, callback, 2, argv, req->context) in AfterAsync() 56 callback->Call(isolate->GetCurrentContext(), in AfterAsync() [all …]
|
| /third_party/flutter/engine/flutter/runtime/ |
| D | dart_isolate_unittests.cc | 36 vm_data->GetIsolateSnapshot(), // isolate snapshot in TEST_F() 45 settings.isolate_create_callback, // isolate create callback in TEST_F() 46 settings.isolate_shutdown_callback // isolate shutdown callback in TEST_F() 69 vm_data->GetIsolateSnapshot(), // isolate snapshot in TEST_F() 78 settings.isolate_create_callback, // isolate create callback in TEST_F() 79 settings.isolate_shutdown_callback // isolate shutdown callback in TEST_F() 97 AutoIsolateShutdown(std::shared_ptr<DartIsolate> isolate, in AutoIsolateShutdown() argument 99 : isolate_(std::move(isolate)), runner_(std::move(runner)) {} in AutoIsolateShutdown() 106 fml::TaskRunner::RunNowOrPostTask(runner_, [isolate = isolate_, &latch]() { in ~AutoIsolateShutdown() 107 FML_LOG(INFO) << "Shutting down isolate."; in ~AutoIsolateShutdown() [all …]
|
| D | dart_isolate.cc | 40 // Since this is the root isolate, we fake a parent embedder data object. We in CreateRootIsolate() 42 // isolate lifecycle is entirely managed by the VM). in CreateRootIsolate() 44 // The child isolate preparer is null but will be set when the isolate is in CreateRootIsolate() 49 std::move(isolate_snapshot), // isolate snapshot in CreateRootIsolate() 56 nullptr, // child isolate preparer in CreateRootIsolate() 57 isolate_create_callback, // isolate create callback in CreateRootIsolate() 58 isolate_shutdown_callback // isolate shutdown callback in CreateRootIsolate() 68 true, // is root isolate in CreateRootIsolate() 119 FML_DCHECK(isolate_snapshot_) << "Must contain a valid isolate snapshot."; in DartIsolate() 134 const char* service_id_buf = Dart_IsolateServiceId(isolate()); in GetServiceId() [all …]
|
| /third_party/node/test/addons/callback-scope/ |
| D | binding.cc | 12 v8::Isolate* isolate = args.GetIsolate(); in RunInCallbackScope() local 25 node::CallbackScope scope(isolate, args[0].As<v8::Object>(), asyncContext); in RunInCallbackScope() 29 fn->Call(isolate->GetCurrentContext(), args[0], 0, nullptr); in RunInCallbackScope() 36 v8::Isolate* isolate = v8::Isolate::GetCurrent(); in Callback() local 37 v8::HandleScope scope(isolate); in Callback() 38 node::CallbackScope callback_scope(isolate, v8::Object::New(isolate), in Callback() 42 v8::Local<v8::Promise::Resolver> local = persistent->Get(isolate); in Callback() 43 local->Resolve(isolate->GetCurrentContext(), in Callback() 44 v8::Undefined(isolate)).ToChecked(); in Callback() 49 v8::Isolate* isolate = args.GetIsolate(); in TestResolveAsync() local [all …]
|
| /third_party/node/test/addons/async-resource/ |
| D | binding.cc | 13 using v8::Isolate; 24 CustomAsyncResource(Isolate* isolate, Local<Object> resource) in CustomAsyncResource() argument 25 : AsyncResource(isolate, resource, "CustomAsyncResource") {} in CustomAsyncResource() 32 Isolate* isolate = args.GetIsolate(); in CreateAsyncResource() local 36 r = new AsyncResource(isolate, args[0].As<Object>(), "foobär", in CreateAsyncResource() 39 r = new AsyncResource(isolate, args[0].As<Object>(), "foobär"); in CreateAsyncResource() 43 External::New(isolate, static_cast<void*>(r))); in CreateAsyncResource() 53 Isolate* isolate = args.GetIsolate(); in CallViaFunction() local 58 String::NewFromUtf8(isolate, "methöd", v8::NewStringType::kNormal) in CallViaFunction() 61 r->get_resource()->Get(isolate->GetCurrentContext(), name) in CallViaFunction() [all …]
|
| /third_party/node/doc/api/ |
| D | addons.md | 66 using v8::Isolate; 74 Isolate* isolate = args.GetIsolate(); 76 isolate, "world", NewStringType::kNormal).ToLocalChecked()); 191 explicit AddonData(Isolate* isolate): 194 node::AddEnvironmentCleanupHook(isolate, DeleteInstance, this); 215 Isolate* isolate = context->GetIsolate(); 219 AddonData* data = new AddonData(isolate); 223 Local<External> external = External::New(isolate, data); 229 String::NewFromUtf8(isolate, "method", NewStringType::kNormal) 231 FunctionTemplate::New(isolate, Method, external) [all …]
|
| /third_party/node/test/cctest/ |
| D | test_aliased_buffer.cc | 42 void ReadAndValidate(v8::Isolate* isolate, in ReadAndValidate() argument 78 void ReadWriteTest(v8::Isolate* isolate) { in ReadWriteTest() argument 79 v8::Isolate::Scope isolate_scope(isolate); in ReadWriteTest() 80 v8::HandleScope handle_scope(isolate); in ReadWriteTest() 81 v8::Local<v8::Context> context = v8::Context::New(isolate); in ReadWriteTest() 85 AliasedBufferBase<NativeT, V8T> ab(isolate, size); in ReadWriteTest() 89 ReadAndValidate(isolate, context, &ab, oracle); in ReadWriteTest() 96 ReadAndValidate(isolate, context, &ab2, oracle); in ReadWriteTest() 98 ReadAndValidate(isolate, context, &ab, oracle); in ReadWriteTest() 106 v8::Isolate* isolate, in SharedBufferTest() argument [all …]
|
| /third_party/ejdb/src/bindings/ejdb2_dart/lib/ |
| D | dart_api.h | 70 * An isolate is the unit of concurrency in Dart. Each isolate has 74 * Each thread keeps track of its current isolate, which is the 75 * isolate which is ready to execute on the current thread. The 76 * current isolate may be NULL, in which case no isolate is ready to 78 * isolate in order to function without error. The current isolate is 130 * down the current isolate. 234 * Persistent handles are allocated within the current isolate. They 236 * the lifetime of the current isolate unless they are explicitly 263 * Requires there to be a current isolate. 274 * Requires there to be a current isolate. [all …]
|
| /third_party/flutter/engine/flutter/shell/common/ |
| D | isolate_configuration.h | 23 /// @brief An isolate configuration is a collection of snapshots and asset 24 /// managers that the engine will use to configure the isolate 26 /// be sufficient for the engine to move the isolate from the 28 /// |DartIsolate::Phase::Ready| phase. Note that the isolate 29 /// configuration will not be collected till the isolate tied to the 31 /// isolate are collected. The engine may ask the configuration to 41 /// @brief Attempts to infer the isolate configuration from the 49 /// shell associated with the engine used to launch the isolate 58 /// @return An isolate configuration if one can be inferred from the 67 /// @brief Creates an AOT isolate configuration using snapshot symbols [all …]
|