Home
last modified time | relevance | path

Searched refs:isolate (Results 1 – 25 of 349) sorted by relevance

12345678910>>...14

/third_party/node/src/api/
Dexceptions.cc22 Local<Value> ErrnoException(Isolate* isolate, in ErrnoException() argument
27 Environment* env = Environment::GetCurrent(isolate); in ErrnoException()
31 Local<String> estring = OneByteString(isolate, errors::errno_string(errorno)); in ErrnoException()
35 Local<String> message = OneByteString(isolate, msg); in ErrnoException()
38 String::Concat(isolate, estring, FIXED_ONE_BYTE_STRING(isolate, ", ")); in ErrnoException()
39 cons = String::Concat(isolate, cons, message); in ErrnoException()
44 path_string = String::NewFromUtf8(isolate, path).ToLocalChecked(); in ErrnoException()
48 cons = String::Concat(isolate, cons, FIXED_ONE_BYTE_STRING(isolate, " '")); in ErrnoException()
49 cons = String::Concat(isolate, cons, path_string); in ErrnoException()
50 cons = String::Concat(isolate, cons, FIXED_ONE_BYTE_STRING(isolate, "'")); in ErrnoException()
[all …]
Denvironment.cc40 bool ShouldAbortOnUncaughtException(Isolate* isolate) { in ShouldAbortOnUncaughtException() argument
41 DebugSealHandleScope scope(isolate); in ShouldAbortOnUncaughtException()
42 Environment* env = Environment::GetCurrent(isolate); in ShouldAbortOnUncaughtException()
72 context, Undefined(env->isolate()), arraysize(args), args); in PrepareStackTraceCallback()
215 void SetIsolateErrorHandlers(v8::Isolate* isolate, const IsolateSettings& s) { in SetIsolateErrorHandlers() argument
217 isolate->AddMessageListenerWithErrorLevel( in SetIsolateErrorHandlers()
225 isolate->SetAbortOnUncaughtExceptionCallback(abort_callback); in SetIsolateErrorHandlers()
229 isolate->SetFatalErrorHandler(fatal_error_cb); in SetIsolateErrorHandlers()
234 isolate->SetPrepareStackTraceCallback(prepare_stack_trace_cb); in SetIsolateErrorHandlers()
238 void SetIsolateMiscHandlers(v8::Isolate* isolate, const IsolateSettings& s) { in SetIsolateMiscHandlers() argument
[all …]
Dcallback.cc20 CallbackScope::CallbackScope(Isolate* isolate, in CallbackScope() argument
23 : CallbackScope(Environment::GetCurrent(isolate), object, async_context) {} in CallbackScope()
31 try_catch_(env->isolate()) { in CallbackScope()
65 HandleScope handle_scope(env->isolate()); in InternalCallbackScope()
67 CHECK_EQ(Environment::GetCurrent(env->isolate()), env); in InternalCallbackScope()
69 env->isolate()->SetIdle(false); in InternalCallbackScope()
92 auto idle = OnScopeLeave([&]() { env_->isolate()->SetIdle(true); }); in Close()
123 MicrotasksScope::PerformCheckpoint(env_->isolate()); in Close()
139 HandleScope handle_scope(env_->isolate()); in Close()
192 args[0] = v8::Number::New(env->isolate(), asyncContext.async_id); in InternalMakeCallback()
[all …]
Dhooks.cc45 HandleScope handle_scope(env->isolate()); in EmitProcessBeforeExit()
67 HandleScope handle_scope(env->isolate()); in EmitProcessExit()
77 FIXED_ONE_BYTE_STRING(env->isolate(), "_exiting"), in EmitProcessExit()
78 True(env->isolate())).IsNothing()) return Nothing<int>(); in EmitProcessExit()
85 ProcessEmit(env, "exit", Integer::New(env->isolate(), code)).IsEmpty() || in EmitProcessExit()
122 void AddEnvironmentCleanupHook(Isolate* isolate, in AddEnvironmentCleanupHook() argument
125 Environment* env = Environment::GetCurrent(isolate); in AddEnvironmentCleanupHook()
130 void RemoveEnvironmentCleanupHook(Isolate* isolate, in RemoveEnvironmentCleanupHook() argument
133 Environment* env = Environment::GetCurrent(isolate); in RemoveEnvironmentCleanupHook()
154 Isolate* isolate, in AddEnvironmentCleanupHook() argument
[all …]
/third_party/cef/libcef/renderer/
Dv8_impl.cc61 v8::Isolate* isolate = context->GetIsolate(); in SetPrivate() local
64 isolate, v8::String::NewFromUtf8( in SetPrivate()
65 isolate, key, v8::NewStringType::kNormal) in SetPrivate()
75 v8::Isolate* isolate = context->GetIsolate(); in GetPrivate() local
79 isolate, v8::String::NewFromUtf8( in GetPrivate()
80 isolate, key, v8::NewStringType::kNormal) in GetPrivate()
164 v8::Isolate* isolate() const { return isolate_; } in isolate() function in __anonac4c0c710111::CefV8IsolateManager
231 explicit V8TrackObject(v8::Isolate* isolate) in V8TrackObject() argument
232 : isolate_(isolate), external_memory_(0) { in V8TrackObject()
320 v8::Isolate* isolate, in V8TrackArrayBuffer() argument
[all …]
/third_party/node/src/
Dnode_env_var.cc36 MaybeLocal<String> Get(Isolate* isolate, Local<String> key) const override;
38 void Set(Isolate* isolate, Local<String> key, Local<String> value) override;
39 int32_t Query(Isolate* isolate, Local<String> key) const override;
41 void Delete(Isolate* isolate, Local<String> key) override;
42 Local<Array> Enumerate(Isolate* isolate) const override;
47 MaybeLocal<String> Get(Isolate* isolate, Local<String> key) const override;
49 void Set(Isolate* isolate, Local<String> key, Local<String> value) override;
50 int32_t Query(Isolate* isolate, Local<String> key) const override;
52 void Delete(Isolate* isolate, Local<String> key) override;
53 Local<Array> Enumerate(Isolate* isolate) const override;
[all …]
Dstring_bytes.cc59 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()
111 ExternString* h_str = new ExternString<ResourceType, TypeName>(isolate, in New()
[all …]
Dstring_decoder.cc26 MaybeLocal<String> MakeString(Isolate* isolate, in MakeString() argument
34 isolate, in MakeString()
39 isolate->ThrowException(node::ERR_STRING_TOO_LONG(isolate)); in MakeString()
46 isolate, in MakeString()
55 isolate->ThrowException(error); in MakeString()
65 MaybeLocal<String> StringDecoder::DecodeData(Isolate* isolate, in DecodeData() argument
119 if (!MakeString(isolate, in DecodeData()
135 body = !prepend.IsEmpty() ? prepend : String::Empty(isolate); in DecodeData()
218 if (!MakeString(isolate, data, nread, Encoding()).ToLocal(&body)) in DecodeData()
221 body = String::Empty(isolate); in DecodeData()
[all …]
Dnode_native_module.cc43 Isolate* isolate = context->GetIsolate(); in GetSourceObject() local
44 Local<Object> out = Object::New(isolate); in GetSourceObject()
46 Local<String> key = OneByteString(isolate, x.first.c_str(), x.first.size()); in GetSourceObject()
47 out->Set(context, key, x.second.ToStringChecked(isolate)).FromJust(); in GetSourceObject()
52 Local<String> NativeModuleLoader::GetConfigString(Isolate* isolate) { in GetConfigString() argument
53 return config_.ToStringChecked(isolate); in GetConfigString()
177 Isolate* isolate = context->GetIsolate(); in CompileAsModule() local
179 FIXED_ONE_BYTE_STRING(isolate, "exports"), in CompileAsModule()
180 FIXED_ONE_BYTE_STRING(isolate, "require"), in CompileAsModule()
181 FIXED_ONE_BYTE_STRING(isolate, "module"), in CompileAsModule()
[all …]
Dmodule_wrap.cc57 module_(env->isolate(), module), in ModuleWrap()
61 Local<Value> undefined = Undefined(env->isolate()); in ModuleWrap()
68 HandleScope scope(env()->isolate()); in ~ModuleWrap()
69 Local<Module> module = module_.Get(env()->isolate()); in ~ModuleWrap()
112 Isolate* isolate = env->isolate(); in New() local
148 PrimitiveArray::New(isolate, HostDefinedOptions::kLength); in New()
149 host_defined_options->Set(isolate, HostDefinedOptions::kType, in New()
150 Number::New(isolate, ScriptType::kModule)); in New()
172 module = Module::CreateSyntheticModule(isolate, url, export_names, in New()
190 True(isolate), // is cross origin in New()
[all …]
Dnode_os.cc74 String::NewFromUtf8(env->isolate(), buf).ToLocalChecked()); in GetHostname()
90 String::NewFromUtf8(env->isolate(), info.sysname).ToLocalChecked(), in GetOSInformation()
91 String::NewFromUtf8(env->isolate(), info.version).ToLocalChecked(), in GetOSInformation()
92 String::NewFromUtf8(env->isolate(), info.release).ToLocalChecked() in GetOSInformation()
95 args.GetReturnValue().Set(Array::New(env->isolate(), in GetOSInformation()
102 Isolate* isolate = env->isolate(); in GetCPUInfo() local
119 result.emplace_back(OneByteString(isolate, ci->model)); in GetCPUInfo()
120 result.emplace_back(Number::New(isolate, ci->speed)); in GetCPUInfo()
121 result.emplace_back(Number::New(isolate, ci->cpu_times.user)); in GetCPUInfo()
122 result.emplace_back(Number::New(isolate, ci->cpu_times.nice)); in GetCPUInfo()
[all …]
Dnode_errors.h73 v8::Isolate* isolate, const char* format, Args&&... args) { \
75 v8::Local<v8::String> js_code = OneByteString(isolate, #code); \
77 OneByteString(isolate, message.c_str(), message.length()); \
79 ->ToObject(isolate->GetCurrentContext()) \
81 e->Set(isolate->GetCurrentContext(), \
82 OneByteString(isolate, "code"), \
89 v8::Isolate* isolate, const char* format, Args&&... args) { \
90 isolate->ThrowException( \
91 code(isolate, format, std::forward<Args>(args)...)); \
96 THROW_##code(env->isolate(), format, std::forward<Args>(args)...); \
[all …]
Dnode_errors.cc51 static std::string GetErrorSource(Isolate* isolate, in GetErrorSource() argument
56 node::Utf8Value encoded_source(isolate, source_line_maybe.ToLocalChecked()); in GetErrorSource()
62 Environment* env = Environment::GetCurrent(isolate); in GetErrorSource()
96 node::Utf8Value filename(isolate, message->GetScriptResourceName()); in GetErrorSource()
148 void PrintStackTrace(Isolate* isolate, Local<StackTrace> stack) { in PrintStackTrace() argument
150 Local<StackFrame> stack_frame = stack->GetFrame(isolate, i); in PrintStackTrace()
151 node::Utf8Value fn_name_s(isolate, stack_frame->GetFunctionName()); in PrintStackTrace()
152 node::Utf8Value script_name(isolate, stack_frame->GetScriptName()); in PrintStackTrace()
183 void PrintException(Isolate* isolate, in PrintException() argument
187 node::Utf8Value reason(isolate, in PrintException()
[all …]
Dnode_perf.cc56 Isolate* isolate = env->isolate(); in InitObject() local
62 String::NewFromUtf8(isolate, in InitObject()
69 String::NewFromUtf8(isolate, in InitObject()
76 Number::New(isolate, entry.startTime()), in InitObject()
80 Number::New(isolate, entry.duration()), in InitObject()
99 Isolate* isolate = env->isolate(); in New() local
100 Utf8Value name(isolate, args[0]); in New()
101 Utf8Value type(isolate, args[1]); in New()
117 node::MakeCallback(env->isolate(), in Notify()
128 HandleScope scope(env->isolate()); in Mark()
[all …]
Dnode_native_module_env.cc26 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()
84 Isolate* isolate = env->isolate(); in GetCacheUsage() local
[all …]
Dnode_task_queue.cc36 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()
124 Isolate* isolate = env->isolate(); in Initialize() local
[all …]
Dnode_buffer.cc120 Local<ArrayBuffer> ab = ArrayBuffer::New(env->isolate(), std::move(bs)); in CreateTrackedArrayBuffer()
129 self->persistent_.Reset(env->isolate(), ab); in CreateTrackedArrayBuffer()
146 env->isolate()->AdjustAmountOfExternalAllocatedMemory(sizeof(*this)); in CallbackInfo()
153 HandleScope handle_scope(self->env_->isolate()); in CleanupHook()
154 Local<ArrayBuffer> ab = self->persistent_.Get(self->env_->isolate()); in CleanupHook()
177 env_->isolate()->AdjustAmountOfExternalAllocatedMemory(change_in_bytes); in CallAndResetCallback()
283 MaybeLocal<Uint8Array> New(Isolate* isolate, in New() argument
287 Environment* env = Environment::GetCurrent(isolate); in New()
289 THROW_ERR_BUFFER_CONTEXT_NOT_AVAILABLE(isolate); in New()
296 MaybeLocal<Object> New(Isolate* isolate, in New() argument
[all …]
Dnode_report_module.cc32 Isolate* isolate = env->isolate(); in WriteReport() local
33 HandleScope scope(isolate); in WriteReport()
38 String::Utf8Value message(isolate, info[0].As<String>()); in WriteReport()
39 String::Utf8Value trigger(isolate, info[1].As<String>()); in WriteReport()
42 filename = *String::Utf8Value(isolate, info[2]); in WriteReport()
49 isolate, env, *message, *trigger, filename, error); in WriteReport()
52 String::NewFromUtf8(isolate, filename.c_str()).ToLocalChecked()); in WriteReport()
58 Isolate* isolate = env->isolate(); in GetReport() local
59 HandleScope scope(isolate); in GetReport()
70 isolate, env, "JavaScript API", __func__, error, out); in GetReport()
[all …]
Dnode.h132 NODE_EXTERN v8::Local<v8::Value> ErrnoException(v8::Isolate* isolate,
137 NODE_EXTERN v8::Local<v8::Value> UVException(v8::Isolate* isolate,
178 v8::Isolate* isolate,
185 v8::Isolate* isolate,
192 v8::Isolate* isolate,
297 virtual bool FlushForegroundTasks(v8::Isolate* isolate) = 0;
298 virtual void DrainTasks(v8::Isolate* isolate) = 0;
303 virtual void CancelPendingDelayedTasks(v8::Isolate* isolate);
310 virtual void RegisterIsolate(v8::Isolate* isolate,
316 virtual void RegisterIsolate(v8::Isolate* isolate,
[all …]
Dnode_process_object.cc72 Isolate* isolate = env->isolate(); in CreateProcessObject() local
73 EscapableHandleScope scope(isolate); in CreateProcessObject()
76 Local<FunctionTemplate> process_template = FunctionTemplate::New(isolate); in CreateProcessObject()
88 FIXED_ONE_BYTE_STRING(env->isolate(), NODE_VERSION)); in CreateProcessObject()
91 Local<Object> versions = Object::New(env->isolate()); in CreateProcessObject()
109 Local<Object> release = Object::New(env->isolate()); in CreateProcessObject()
135 Isolate* isolate = args.GetIsolate(); in PatchProcessObject() local
136 Local<Context> context = isolate->GetCurrentContext(); in PatchProcessObject()
145 FIXED_ONE_BYTE_STRING(isolate, "title"), in PatchProcessObject()
156 FIXED_ONE_BYTE_STRING(isolate, "argv"), in PatchProcessObject()
[all …]
Dcares_wrap.cc160 EscapableHandleScope scope(env->isolate()); in HostentToNames()
165 names.emplace_back(OneByteString(env->isolate(), host->h_aliases[i])); in HostentToNames()
167 Local<Array> ret = Array::New(env->isolate(), names.data(), names.size()); in HostentToNames()
181 OneByteString(env->isolate(), host->h_aliases[i])).Check(); in HostentToNames()
194 ttls[i] = Integer::NewFromUnsigned(env->isolate(), addrttls[i].ttl); in AddrTTLToArray()
196 return Array::New(env->isolate(), ttls.out(), naddrttls); in AddrTTLToArray()
207 HandleScope handle_scope(env->isolate()); in ParseGeneralReply()
255 OneByteString(env->isolate(), ptr->h_name)).Check(); in ParseGeneralReply()
267 auto alias = OneByteString(env->isolate(), ptr->h_aliases[i]); in ParseGeneralReply()
275 auto address = OneByteString(env->isolate(), ip); in ParseGeneralReply()
[all …]
/third_party/node/test/addons/async-hello-world/
Dbinding.cc16 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/node/test/addons/callback-scope/
Dbinding.cc12 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/
Dbinding.cc24 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").ToLocalChecked(); in CallViaFunction()
60 r->get_resource()->Get(isolate->GetCurrentContext(), name) in CallViaFunction()
64 Local<Value> arg = Integer::New(isolate, 42); in CallViaFunction()
[all …]
/third_party/flutter/engine/flutter/runtime/
Ddart_isolate_unittests.cc97 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()
108 if (!isolate->Shutdown()) { in ~AutoIsolateShutdown()
129 tonic::DartIsolateScope scope(isolate_->isolate()); in RunInIsolateScope()
283 auto isolate = RunDartCodeInIsolate(vm_ref, settings, GetCurrentTaskRunner(), in TEST_F() local
285 ASSERT_TRUE(isolate); in TEST_F()
286 ASSERT_EQ(isolate->get()->GetPhase(), DartIsolate::Phase::Running); in TEST_F()
293 auto isolate = RunDartCodeInIsolate(vm_ref, settings, GetCurrentTaskRunner(), in TEST_F() local
295 ASSERT_FALSE(isolate); in TEST_F()
[all …]

12345678910>>...14