Lines Matching defs:isolate
56 #include "src/execution/isolate-inl.h"
173 static ScriptOrigin GetScriptOriginForScript(i::Isolate* isolate,
175 i::Handle<i::Object> scriptName(script->GetNameOrSourceURL(), isolate);
176 i::Handle<i::Object> source_map_url(script->source_mapping_url(), isolate);
178 isolate);
185 reinterpret_cast<v8::Isolate*>(isolate), Utils::ToLocal(scriptName),
206 void i::FatalProcessOutOfMemory(i::Isolate* isolate, const char* location) {
207 i::V8::FatalProcessOutOfMemory(isolate, location, false);
212 void i::V8::FatalProcessOutOfMemory(i::Isolate* isolate, const char* location,
218 if (isolate == nullptr) {
219 isolate = Isolate::TryGetCurrent();
222 if (isolate == nullptr) {
293 if (isolate->heap()->HasBeenSetUp()) {
296 isolate->heap()->RecordStats(&heap_stats, false);
305 Utils::ReportOOMFailure(isolate, location, is_heap_oom);
312 i::Isolate* isolate = i::Isolate::TryGetCurrent();
314 if (isolate != nullptr) {
315 callback = isolate->exception_behavior();
324 isolate->SignalFatalError();
327 void Utils::ReportOOMFailure(i::Isolate* isolate, const char* location,
329 OOMErrorCallback oom_callback = isolate->oom_behavior();
333 FatalErrorCallback fatal_callback = isolate->exception_behavior();
351 isolate->SignalFatalError();
435 explicit SnapshotCreatorData(Isolate* isolate)
436 : isolate_(isolate),
438 contexts_(isolate),
456 SnapshotCreator::SnapshotCreator(Isolate* isolate,
459 SnapshotCreatorData* data = new SnapshotCreatorData(isolate);
460 i::Isolate* internal_isolate = reinterpret_cast<i::Isolate*>(isolate);
464 isolate->Enter();
486 Isolate* isolate = data->isolate_;
487 isolate->Exit();
488 isolate->Dispose();
502 Isolate* isolate = data->isolate_;
503 CHECK_EQ(isolate, context->GetIsolate());
504 data->default_context_.Reset(isolate, context);
513 Isolate* isolate = data->isolate_;
514 CHECK_EQ(isolate, context->GetIsolate());
525 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(data->isolate_);
526 i::HandleScope scope(isolate);
527 i::Handle<i::Object> obj(i::Object(object), isolate);
529 if (!isolate->heap()->serialized_objects().IsArrayList()) {
530 list = i::ArrayList::New(isolate, 1);
533 i::ArrayList::cast(isolate->heap()->serialized_objects()), isolate);
536 list = i::ArrayList::Add(isolate, list, obj);
537 isolate->heap()->SetSerializedObjects(*list);
545 i::Isolate* isolate = ctx->GetIsolate();
546 i::HandleScope scope(isolate);
547 i::Handle<i::Object> obj(i::Object(object), isolate);
550 list = i::ArrayList::New(isolate, 1);
553 i::ArrayList::cast(ctx->serialized_objects()), isolate);
556 list = i::ArrayList::Add(isolate, list, obj);
564 i::Isolate* isolate = ctx->GetIsolate();
566 ctx->set_serialized_objects(i::ReadOnlyRoots(isolate).empty_fixed_array());
569 isolate);
570 i::Handle<i::FixedArray> elements = i::ArrayList::Elements(isolate, list);
575 void ConvertSerializedObjectsToFixedArray(i::Isolate* isolate) {
576 if (!isolate->heap()->serialized_objects().IsArrayList()) {
577 isolate->heap()->SetSerializedObjects(
578 i::ReadOnlyRoots(isolate).empty_fixed_array());
581 i::ArrayList::cast(isolate->heap()->serialized_objects()), isolate);
582 i::Handle<i::FixedArray> elements = i::ArrayList::Elements(isolate, list);
583 isolate->heap()->SetSerializedObjects(*elements);
591 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(data->isolate_);
605 i::HandleScope scope(isolate);
607 ConvertSerializedObjectsToFixedArray(isolate);
619 isolate->factory()->NewFixedArray(num_additional_contexts,
627 isolate->heap()->SetSerializedGlobalProxySizes(*global_proxy_sizes);
631 isolate->descriptor_lookup_cache()->Clear();
635 isolate->heap()->CollectAllAvailableGarbage(
638 i::HandleScope scope(isolate);
639 isolate->heap()->CompactWeakArrayLists();
643 isolate, function_code_handling == FunctionCodeHandling::kClear);
645 i::GlobalSafepointScope global_safepoint(isolate);
655 i::HandleScope scope(isolate);
668 i::SerializedHandleChecker handle_checker(isolate, &contexts);
682 return i::Snapshot::Create(isolate, &contexts, embedder_fields_serializers,
813 i::Address* GlobalizeTracedReference(i::Isolate* isolate, i::Address* obj,
816 API_RCS_SCOPE(isolate, TracedGlobal, New);
822 isolate->global_handles()->CreateTraced(*obj, slot, store_mode);
825 i::Object(*obj).ObjectVerify(isolate);
848 i::Address* GlobalizeReference(i::Isolate* isolate, i::Address* obj) {
849 API_RCS_SCOPE(isolate, Persistent, New);
850 i::Handle<i::Object> result = isolate->global_handles()->Create(*obj);
853 i::Object(*obj).ObjectVerify(isolate);
891 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate);
894 isolate->eternal_handles()->Create(isolate, object, &index);
896 isolate->eternal_handles()->Get(index).location());
917 HandleScope::HandleScope(Isolate* isolate) { Initialize(isolate); }
919 void HandleScope::Initialize(Isolate* isolate) {
920 i::Isolate* internal_isolate = reinterpret_cast<i::Isolate*>(isolate);
948 int HandleScope::NumberOfHandles(Isolate* isolate) {
950 reinterpret_cast<i::Isolate*>(isolate));
953 i::Address* HandleScope::CreateHandle(i::Isolate* isolate, i::Address value) {
954 return i::HandleScope::CreateHandle(isolate, value);
958 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate);
960 CreateHandle(isolate, i::ReadOnlyRoots(isolate).the_hole_value().ptr());
966 Utils::ApiCheck(i::Object(*escape_slot_).IsTheHole(heap->isolate()),
983 SealHandleScope::SealHandleScope(Isolate* isolate)
984 : isolate_(reinterpret_cast<i::Isolate*>(isolate)) {
1038 i::Isolate* isolate = env->GetIsolate();
1039 ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate);
1040 i::HandleScopeImplementer* impl = isolate->handle_scope_implementer();
1042 impl->SaveContext(isolate->context());
1043 isolate->set_context(*env);
1048 i::Isolate* isolate = env->GetIsolate();
1049 ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate);
1050 i::HandleScopeImplementer* impl = isolate->handle_scope_implementer();
1056 isolate->set_context(impl->RestoreContext());
1065 i::Isolate* isolate = env->GetIsolate();
1068 i::SimulatorStack::RegisterJSStackComparableAddress(isolate);
1070 prev_ = isolate->top_backup_incumbent_scope();
1071 isolate->set_top_backup_incumbent_scope(this);
1076 i::Isolate* isolate = env->GetIsolate();
1078 i::SimulatorStack::UnregisterJSStackComparableAddress(isolate);
1080 isolate->set_top_backup_incumbent_scope(prev_);
1089 i::Isolate* isolate = env->GetIsolate();
1090 ASSERT_NO_SCRIPT_NO_EXCEPTION(isolate);
1097 i::EmbedderDataArray::cast(env->embedder_data()), isolate);
1103 data = i::EmbedderDataArray::EnsureCapacity(isolate, data, index);
1124 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate();
1126 isolate);
1143 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate();
1144 i::HandleScope handle_scope(isolate);
1150 i::EmbedderDataSlot(*data, index).ToAlignedPointer(isolate, &result),
1157 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate();
1161 i::EmbedderDataSlot(*data, index).store_aligned_pointer(isolate, value);
1180 i::Isolate* isolate = templ->GetIsolate();
1181 ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate);
1182 i::HandleScope scope(isolate);
1196 i::ApiNatives::AddDataProperty(isolate, templ, Utils::OpenHandle(*name),
1215 auto isolate = templ->GetIsolate();
1216 ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate);
1219 i::HandleScope scope(isolate);
1221 isolate, templ, Utils::OpenHandle(*name),
1234 i::Isolate* isolate, v8::Local<FunctionTemplate> constructor,
1288 i::Isolate* isolate, FunctionCallback callback, v8::Local<Value> data,
1297 i::Handle<i::Struct> struct_obj = isolate->factory()->NewStruct(
1315 ? i::ReadOnlyRoots(isolate).the_hole_value()
1332 Isolate* isolate, FunctionCallback callback, v8::Local<Value> data,
1337 i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
1339 // function templates when the isolate is created for serialization.
1360 Isolate* isolate, FunctionCallback callback, v8::Local<Value> data,
1364 i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
1382 Isolate* isolate, FunctionCallback callback, Local<Private> cache_property,
1385 i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
1393 Local<Signature> Signature::New(Isolate* isolate,
1399 Isolate* isolate, Local<FunctionTemplate> receiver) {
1403 #define SET_FIELD_WRAPPED(isolate, obj, setter, cdata) \
1405 i::Handle<i::Object> foreign = FromCData(isolate, cdata); \
1415 i::Isolate* isolate = info->GetIsolate();
1416 ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate);
1417 i::HandleScope scope(isolate);
1418 i::Handle<i::CallHandlerInfo> obj = isolate->factory()->NewCallHandlerInfo(
1420 SET_FIELD_WRAPPED(isolate, obj, set_callback, callback);
1421 SET_FIELD_WRAPPED(isolate, obj, set_js_callback, obj->redirected_callback());
1423 data = v8::Undefined(reinterpret_cast<v8::Isolate*>(isolate));
1430 isolate->factory()->NewFixedArray(static_cast<int>(
1437 FromCData(isolate, c_function.GetAddress());
1441 FromCData(isolate, c_function.GetTypeInfo());
1446 i::FunctionTemplateInfo::SetCFunctionOverloads(isolate, info,
1456 i::Isolate* isolate, v8::Local<Name> name, Getter getter, Setter setter,
1460 i::Handle<i::AccessorInfo> obj = isolate->factory()->NewAccessorInfo();
1461 SET_FIELD_WRAPPED(isolate, obj, set_getter, getter);
1467 SET_FIELD_WRAPPED(isolate, obj, set_setter, setter);
1470 SET_FIELD_WRAPPED(isolate, obj, set_js_getter, redirected);
1475 accessor_name = isolate->factory()->InternalizeString(
1481 raw_obj.set_data(i::ReadOnlyRoots(isolate).undefined_value());
1506 i::Isolate* isolate = handle->GetIsolate();
1507 ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate);
1508 if (handle->GetInstanceTemplate().IsUndefined(isolate)) {
1510 ObjectTemplate::New(isolate, ToApiHandle<FunctionTemplate>(handle));
1511 i::FunctionTemplateInfo::SetInstanceTemplate(isolate, handle,
1515 i::ObjectTemplateInfo::cast(handle->GetInstanceTemplate()), isolate);
1522 auto isolate = info->GetIsolate();
1523 ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate);
1530 auto isolate = info->GetIsolate();
1531 ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate);
1538 auto isolate = info->GetIsolate();
1539 ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate);
1546 auto isolate = info->GetIsolate();
1547 ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate);
1554 auto isolate = info->GetIsolate();
1555 ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate);
1562 Isolate* isolate, v8::Local<FunctionTemplate> constructor) {
1563 return New(reinterpret_cast<i::Isolate*>(isolate), constructor);
1567 i::Isolate* isolate, v8::Local<FunctionTemplate> constructor,
1569 API_RCS_SCOPE(isolate, ObjectTemplate, New);
1570 ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate);
1571 i::Handle<i::Struct> struct_obj = isolate->factory()->NewStruct(
1589 i::Isolate* isolate, v8::Local<FunctionTemplate> constructor) {
1590 return ObjectTemplateNew(isolate, constructor, false);
1596 i::Isolate* isolate, ObjectTemplate* object_template) {
1598 if (!obj.IsUndefined(isolate)) {
1600 return i::Handle<i::FunctionTemplateInfo>(info, isolate);
1603 FunctionTemplate::New(reinterpret_cast<Isolate*>(isolate));
1606 isolate, constructor, Utils::OpenHandle(object_template));
1619 auto isolate = info->GetIsolate();
1620 ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate);
1621 i::HandleScope scope(isolate);
1623 MakeAccessorInfo(isolate, name, getter, setter, data, settings, signature,
1633 i::ApiNatives::AddNativeDataProperty(isolate, info, accessor_info);
1699 i::Isolate* isolate = templ->GetIsolate();
1700 ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate);
1701 i::HandleScope scope(isolate);
1702 i::ApiNatives::AddDataProperty(isolate, templ, Utils::OpenHandle(*name),
1762 i::Isolate* isolate, Getter getter, Setter setter, Query query,
1765 auto obj = i::Handle<i::InterceptorInfo>::cast(isolate->factory()->NewStruct(
1769 if (getter != nullptr) SET_FIELD_WRAPPED(isolate, obj, set_getter, getter);
1770 if (setter != nullptr) SET_FIELD_WRAPPED(isolate, obj, set_setter, setter);
1771 if (query != nullptr) SET_FIELD_WRAPPED(isolate, obj, set_query, query);
1773 SET_FIELD_WRAPPED(isolate, obj, set_descriptor, descriptor);
1774 if (remover != nullptr) SET_FIELD_WRAPPED(isolate, obj, set_deleter, remover);
1776 SET_FIELD_WRAPPED(isolate, obj, set_enumerator, enumerator);
1777 if (definer != nullptr) SET_FIELD_WRAPPED(isolate, obj, set_definer, definer);
1790 data = v8::Undefined(reinterpret_cast<v8::Isolate*>(isolate));
1799 i::Isolate* isolate, Getter getter, Setter setter, Query query,
1803 CreateInterceptorInfo(isolate, getter, setter, query, descriptor, remover,
1812 i::Isolate* isolate, Getter getter, Setter setter, Query query,
1816 CreateInterceptorInfo(isolate, getter, setter, query, descriptor, remover,
1828 i::Isolate* isolate = Utils::OpenHandle(templ)->GetIsolate();
1829 ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate);
1830 i::HandleScope scope(isolate);
1831 auto cons = EnsureConstructor(isolate, templ);
1834 CreateNamedInterceptorInfo(isolate, getter, setter, query, descriptor,
1836 i::FunctionTemplateInfo::SetNamedPropertyHandler(isolate, cons, obj);
1848 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate();
1849 ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate);
1850 i::HandleScope scope(isolate);
1851 auto cons = EnsureConstructor(isolate, this);
1858 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate();
1859 ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate);
1860 i::HandleScope scope(isolate);
1861 auto cons = EnsureConstructor(isolate, this);
1864 i::Handle<i::Struct> struct_info = isolate->factory()->NewStruct(
1869 SET_FIELD_WRAPPED(isolate, info, set_callback, callback);
1874 data = v8::Undefined(reinterpret_cast<v8::Isolate*>(isolate));
1878 i::FunctionTemplateInfo::SetAccessCheckInfo(isolate, cons, info);
1887 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate();
1888 ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate);
1889 i::HandleScope scope(isolate);
1890 auto cons = EnsureConstructor(isolate, this);
1894 i::Handle<i::Struct> struct_info = isolate->factory()->NewStruct(
1899 SET_FIELD_WRAPPED(isolate, info, set_callback, callback);
1901 isolate, named_handler.getter, named_handler.setter, named_handler.query,
1906 isolate, indexed_handler.getter, indexed_handler.setter,
1913 data = v8::Undefined(reinterpret_cast<v8::Isolate*>(isolate));
1917 i::FunctionTemplateInfo::SetAccessCheckInfo(isolate, cons, info);
1923 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate();
1924 ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate);
1925 i::HandleScope scope(isolate);
1926 auto cons = EnsureConstructor(isolate, this);
1929 isolate, config.getter, config.setter, config.query, config.descriptor,
1932 i::FunctionTemplateInfo::SetIndexedPropertyHandler(isolate, cons, obj);
1937 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate();
1938 ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate);
1939 i::HandleScope scope(isolate);
1940 auto cons = EnsureConstructor(isolate, this);
1942 i::Handle<i::CallHandlerInfo> obj = isolate->factory()->NewCallHandlerInfo();
1943 SET_FIELD_WRAPPED(isolate, obj, set_callback, callback);
1944 SET_FIELD_WRAPPED(isolate, obj, set_js_callback, obj->redirected_callback());
1946 data = v8::Undefined(reinterpret_cast<v8::Isolate*>(isolate));
1949 i::FunctionTemplateInfo::SetInstanceCallHandler(isolate, cons, obj);
1957 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate();
1963 ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate);
1968 EnsureConstructor(isolate, this);
1979 i::Isolate* isolate = self->GetIsolate();
1980 ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate);
1990 i::Isolate* isolate = self->GetIsolate();
1991 ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate);
2022 i::Isolate* isolate = function_info->GetIsolate();
2023 ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate);
2025 i::Factory::JSFunctionBuilder{isolate, function_info,
2026 isolate->native_context()}
2040 i::Isolate* isolate = obj->GetIsolate();
2041 ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate);
2042 API_RCS_SCOPE(isolate, UnboundScript, GetLineNumber);
2044 i::Handle<i::Script> script(i::Script::cast(obj->script()), isolate);
2054 i::Isolate* isolate = obj->GetIsolate();
2055 ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate);
2056 API_RCS_SCOPE(isolate, UnboundScript, GetName);
2059 return Utils::ToLocal(i::Handle<i::Object>(name, isolate));
2068 i::Isolate* isolate = obj->GetIsolate();
2069 ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate);
2070 API_RCS_SCOPE(isolate, UnboundScript, GetSourceURL);
2073 return Utils::ToLocal(i::Handle<i::Object>(url, isolate));
2082 i::Isolate* isolate = obj->GetIsolate();
2083 API_RCS_SCOPE(isolate, UnboundScript, GetSourceMappingURL);
2084 ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate);
2087 return Utils::ToLocal(i::Handle<i::Object>(url, isolate));
2100 auto isolate = reinterpret_cast<i::Isolate*>(v8_isolate);
2101 TRACE_EVENT_CALL_STATS_SCOPED(isolate, "v8", "V8.Execute");
2102 ENTER_V8(isolate, context, Script, Run, MaybeLocal<Value>(),
2104 i::TimerEventScope<i::TimerEventExecute> timer_scope(isolate);
2105 i::NestedTimedHistogramScope execute_timer(isolate->counters()->execute(),
2106 isolate);
2108 isolate->counters()->compile_lazy());
2117 if (i::FLAG_script_delay_once > 0 && !isolate->did_run_script_delay()) {
2119 isolate->set_did_run_script_delay(true);
2132 handle(fun->shared().script(), isolate);
2145 i::Handle<i::Object> receiver = isolate->global_proxy();
2148 i::Script::cast(fun->shared().script()).host_defined_options(), isolate);
2151 i::Execution::CallScript(isolate, fun, receiver, options), &result);
2168 i::Isolate* isolate = i::GetIsolateFromWritableObject(*obj);
2169 ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate);
2170 i::Handle<i::Object> val(obj->resource_name(), isolate);
2180 i::Isolate* isolate = i::GetIsolateFromWritableObject(*obj);
2181 ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate);
2182 i::Handle<i::Object> val(obj->host_defined_options(), isolate);
2190 i::Isolate* isolate = sfi.GetIsolate();
2191 return ToApiHandle<UnboundScript>(i::handle(sfi, isolate));
2198 i::Isolate* isolate = func->GetIsolate();
2201 i::handle(i::Script::cast(sfi.script()).name(), isolate));
2206 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate);
2207 ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate);
2210 i::Handle<i::FixedArray> array = isolate->factory()->NewFixedArray(length);
2221 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate);
2223 ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate);
2233 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate);
2235 ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate);
2240 i::Handle<i::Object> i_item(array->get(index), isolate);
2259 auto isolate = reinterpret_cast<i::Isolate*>(context->GetIsolate());
2261 i::Handle<i::Object> entry(self->get(i), isolate);
2267 i::Isolate* isolate = self->GetIsolate();
2268 return ToApiHandle<String>(i::handle(self->specifier(), isolate));
2277 i::Isolate* isolate = self->GetIsolate();
2278 return ToApiHandle<FixedArray>(i::handle(self->import_assertions(), isolate));
2306 i::Isolate* isolate = self->GetIsolate();
2307 ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate);
2308 return ToApiHandle<Value>(i::handle(self->GetException(), isolate));
2319 i::Isolate* isolate = self->GetIsolate();
2322 isolate);
2329 i::Isolate* isolate = self->GetIsolate();
2330 ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate);
2331 i::HandleScope scope(isolate);
2336 i::Handle<i::SourceTextModule>::cast(self)->GetScript(), isolate);
2347 auto isolate = self->GetIsolate();
2348 ASSERT_NO_SCRIPT_NO_EXCEPTION(isolate);
2350 i::Module::GetModuleNamespace(isolate, self);
2359 auto isolate = self->GetIsolate();
2360 ASSERT_NO_SCRIPT_NO_EXCEPTION(isolate);
2363 isolate));
2379 auto isolate = self.GetIsolate();
2380 ASSERT_NO_SCRIPT_NO_EXCEPTION(isolate);
2381 return self.IsGraphAsync(isolate);
2396 auto isolate = reinterpret_cast<i::Isolate*>(context->GetIsolate());
2397 ENTER_V8(isolate, context, Module, InstantiateModule, Nothing<bool>(),
2400 isolate, Utils::OpenHandle(this), context, callback, nullptr);
2406 auto isolate = reinterpret_cast<i::Isolate*>(context->GetIsolate());
2407 TRACE_EVENT_CALL_STATS_SCOPED(isolate, "v8", "V8.Execute");
2408 ENTER_V8(isolate, context, Module, Evaluate, MaybeLocal<Value>(),
2410 i::TimerEventScope<i::TimerEventExecute> timer_scope(isolate);
2411 i::NestedTimedHistogramScope execute_timer(isolate->counters()->execute(),
2412 isolate);
2413 i::AggregatingHistogramTimerScope timer(isolate->counters()->compile_lazy());
2420 has_pending_exception = !ToLocal(i::Module::Evaluate(isolate, self), &result);
2426 Isolate* isolate, Local<String> module_name,
2429 auto i_isolate = reinterpret_cast<i::Isolate*>(isolate);
2444 Maybe<bool> Module::SetSyntheticModuleExport(Isolate* isolate,
2447 auto i_isolate = reinterpret_cast<i::Isolate*>(isolate);
2455 ENTER_V8_NO_SCRIPT(i_isolate, isolate->GetCurrentContext(), Module,
2469 i::Isolate* isolate, Local<Value> resource_name, int resource_line_offset,
2478 ? isolate->factory()->empty_fixed_array()
2491 auto isolate = reinterpret_cast<i::Isolate*>(v8_isolate);
2492 TRACE_EVENT_CALL_STATS_SCOPED(isolate, "v8", "V8.ScriptCompiler");
2493 ENTER_V8_NO_SCRIPT(isolate, v8_isolate->GetCurrentContext(), ScriptCompiler,
2502 isolate, source->resource_name, source->resource_line_offset,
2516 isolate, str, script_details, deserialize_task.get(), options,
2526 isolate, str, script_details, cached_data.get(), options,
2533 isolate, str, script_details, options, no_cache_reason,
2559 auto isolate = context->GetIsolate();
2561 CompileUnboundInternal(isolate, source, options, no_cache_reason);
2569 Isolate* isolate, Source* source, CompileOptions options,
2578 CompileUnboundInternal(isolate, source, options, no_cache_reason);
2582 i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
2620 TRACE_EVENT_CALL_STATS_SCOPED(isolate, "v8", "V8.ScriptCompiler");
2631 isolate->factory()->NewFixedArray(static_cast<int>(arguments_count));
2634 if (!i::String::IsIdentifier(isolate, argument)) return Local<Function>();
2642 context = isolate->factory()->NewWithContext(
2645 isolate,
2648 : i::Handle<i::ScopeInfo>(context->scope_info(), isolate)),
2653 isolate, source->resource_name, source->resource_line_offset,
2681 i::Isolate* isolate = function->GetIsolate();
2682 i::Handle<i::SharedFunctionInfo> shared(function->shared(), isolate);
2683 i::Handle<i::Script> script(i::Script::cast(shared->script()), isolate);
2686 isolate->factory()->NewStruct(i::SCRIPT_OR_MODULE_TYPE));
2691 i::handle(script->script_or_modules(), isolate);
2692 list = i::ArrayList::Add(isolate, list, script_or_module);
2705 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate);
2706 ASSERT_NO_SCRIPT_NO_EXCEPTION(isolate);
2709 std::make_unique<i::BackgroundCompileTask>(data, isolate, type);
2725 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate);
2726 ASSERT_NO_SCRIPT_NO_EXCEPTION(isolate);
2728 std::make_unique<i::BackgroundDeserializeTask>(isolate,
2734 i::Isolate* isolate, ScriptCompiler::StreamedSource* v8_source,
2738 GetScriptDetails(isolate, origin.ResourceName(), origin.LineOffset(),
2743 isolate, str, script_details, data);
2753 TRACE_EVENT_CALL_STATS_SCOPED(isolate, "v8", "V8.ScriptCompiler");
2758 CompileStreamedSource(isolate, v8_source, full_source_string, origin);
2760 if (has_pending_exception) isolate->ReportPendingMessages();
2773 TRACE_EVENT_CALL_STATS_SCOPED(isolate, "v8", "V8.ScriptCompiler");
2778 CompileStreamedSource(isolate, v8_source, full_source_string, origin);
2780 if (has_pending_exception) isolate->ReportPendingMessages();
2782 i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
2839 v8::TryCatch::TryCatch(v8::Isolate* isolate)
2840 : isolate_(reinterpret_cast<i::Isolate*>(isolate)),
2856 v8::Isolate* isolate = reinterpret_cast<Isolate*>(isolate_);
2857 v8::HandleScope scope(isolate);
2858 v8::Local<v8::Value> exc = v8::Local<v8::Value>::New(isolate, Exception());
2919 i::Handle<i::String> name = isolate->factory()->stack_string();
2920 Maybe<bool> maybe = i::JSReceiver::HasProperty(isolate, obj, name);
2926 !ToLocal<Value>(i::JSReceiver::GetProperty(isolate, obj, name), &result);
2972 i::Isolate* isolate = self->GetIsolate();
2973 ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate);
2974 EscapableHandleScope scope(reinterpret_cast<Isolate*>(isolate));
2976 i::MessageHandler::GetMessage(isolate, self);
2982 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate();
2983 return reinterpret_cast<Isolate*>(isolate);
2988 i::Isolate* isolate = self->GetIsolate();
2989 ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate);
2990 i::Handle<i::Script> script(self->script(), isolate);
2991 return GetScriptOriginForScript(isolate, script);
3016 i::Isolate* isolate = self->GetIsolate();
3017 ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate);
3018 EscapableHandleScope scope(reinterpret_cast<Isolate*>(isolate));
3019 i::Handle<i::Object> stackFramesObj(self->stack_frames(), isolate);
3027 i::Isolate* isolate = self->GetIsolate();
3028 ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate);
3029 EscapableHandleScope handle_scope(reinterpret_cast<Isolate*>(isolate));
3030 i::JSMessageObject::EnsureSourcePositionsAvailable(isolate, self);
3036 i::Isolate* isolate = self->GetIsolate();
3037 ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate);
3038 EscapableHandleScope handle_scope(reinterpret_cast<Isolate*>(isolate));
3039 i::JSMessageObject::EnsureSourcePositionsAvailable(isolate, self);
3045 i::Isolate* isolate = self->GetIsolate();
3046 ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate);
3047 EscapableHandleScope handle_scope(reinterpret_cast<Isolate*>(isolate));
3048 i::JSMessageObject::EnsureSourcePositionsAvailable(isolate, self);
3060 i::Isolate* isolate = self->GetIsolate();
3061 ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate);
3062 EscapableHandleScope handle_scope(reinterpret_cast<Isolate*>(isolate));
3063 i::JSMessageObject::EnsureSourcePositionsAvailable(isolate, self);
3070 i::Isolate* isolate = self->GetIsolate();
3071 ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate);
3072 EscapableHandleScope handle_scope(reinterpret_cast<Isolate*>(isolate));
3073 i::JSMessageObject::EnsureSourcePositionsAvailable(isolate, self);
3077 i::Handle<i::Script> script(self->script(), isolate);
3097 i::Isolate* isolate = self->GetIsolate();
3098 ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate);
3099 EscapableHandleScope handle_scope(reinterpret_cast<Isolate*>(isolate));
3100 i::JSMessageObject::EnsureSourcePositionsAvailable(isolate, self);
3114 i::Isolate* isolate = self->GetIsolate();
3115 ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate);
3121 i::Isolate* isolate = self->GetIsolate();
3122 ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate);
3128 i::Isolate* isolate = self->GetIsolate();
3129 ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate);
3130 EscapableHandleScope handle_scope(reinterpret_cast<Isolate*>(isolate));
3131 i::Handle<i::String> source(self->GetSource(), isolate);
3137 i::Isolate* isolate = self->GetIsolate();
3138 ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate);
3139 EscapableHandleScope handle_scope(reinterpret_cast<Isolate*>(isolate));
3140 i::JSMessageObject::EnsureSourcePositionsAvailable(isolate, self);
3144 void Message::PrintCurrentStackTrace(Isolate* isolate, std::ostream& out) {
3145 i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
3154 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate);
3156 i::StackFrameInfo::cast(Utils::OpenHandle(this)->get(index)), isolate);
3164 Local<StackTrace> StackTrace::CurrentStackTrace(Isolate* isolate,
3167 i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
3175 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate);
3176 ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate);
3178 isolate->CurrentScriptNameOrSourceURL();
3186 i::Isolate* isolate = self->GetIsolate();
3187 i::Handle<i::Script> script(self->script(), isolate);
3207 i::Isolate* isolate = self->GetIsolate();
3208 i::Handle<i::Object> name(self->script().name(), isolate);
3215 i::Isolate* isolate = self->GetIsolate();
3217 isolate);
3224 i::Isolate* isolate = self->GetIsolate();
3226 i::Handle<i::PrimitiveHeapObject> source(self->script().source(), isolate);
3233 i::Isolate* isolate = self->GetIsolate();
3235 isolate);
3242 i::Isolate* isolate = self->GetIsolate();
3243 i::Handle<i::String> name(self->function_name(), isolate);
3269 i::Handle<i::String> source = i::String::Flatten(isolate, string);
3270 i::Handle<i::Object> undefined = isolate->factory()->undefined_value();
3272 ? i::JsonParser<uint8_t>::Parse(isolate, source, undefined)
3273 : i::JsonParser<uint16_t>::Parse(isolate, source, undefined);
3285 i::Handle<i::Object> replacer = isolate->factory()->undefined_value();
3287 ? isolate->factory()->empty_string()
3291 !i::JsonStringify(isolate, object, replacer, gap_string).ToHandle(&maybe);
3295 !ToLocal<String>(i::Object::ToString(isolate, maybe), &result);
3304 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate);
3305 isolate->ScheduleThrow(*isolate->factory()->NewError(
3306 isolate->error_function(), i::MessageTemplate::kDataCloneError,
3313 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate);
3314 isolate->ScheduleThrow(*isolate->factory()->NewError(
3315 isolate->error_function(), i::MessageTemplate::kDataCloneError,
3329 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate);
3330 isolate->ScheduleThrow(*isolate->factory()->NewError(
3331 isolate->error_function(), i::MessageTemplate::kDataCloneError,
3349 : isolate(i), serializer(i, delegate) {}
3350 i::Isolate* isolate;
3354 ValueSerializer::ValueSerializer(Isolate* isolate)
3355 : ValueSerializer(isolate, nullptr) {}
3357 ValueSerializer::ValueSerializer(Isolate* isolate, Delegate* delegate)
3359 new PrivateData(reinterpret_cast<i::Isolate*>(isolate), delegate)) {}
3371 auto isolate = reinterpret_cast<i::Isolate*>(context->GetIsolate());
3372 ENTER_V8(isolate, context, ValueSerializer, WriteValue, Nothing<bool>(),
3409 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate);
3410 isolate->ScheduleThrow(*isolate->factory()->NewError(
3411 isolate->error_function(),
3418 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate);
3419 isolate->ScheduleThrow(*isolate->factory()->NewError(
3420 isolate->error_function(),
3429 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate);
3430 isolate->ScheduleThrow(*isolate->factory()->NewError(
3431 isolate->error_function(),
3439 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate);
3440 isolate->ScheduleThrow(*isolate->factory()->NewError(
3441 isolate->error_function(),
3449 : isolate(i), deserializer(i, data, delegate) {}
3450 i::Isolate* isolate;
3455 ValueDeserializer::ValueDeserializer(Isolate* isolate, const uint8_t* data,
3457 : ValueDeserializer(isolate, data, size, nullptr) {}
3459 ValueDeserializer::ValueDeserializer(Isolate* isolate, const uint8_t* data,
3461 private_ = new PrivateData(reinterpret_cast<i::Isolate*>(isolate),
3468 auto isolate = reinterpret_cast<i::Isolate*>(context->GetIsolate());
3469 ENTER_V8_NO_SCRIPT(isolate, context, ValueDeserializer, ReadHeader,
3480 isolate->Throw(*isolate->factory()->NewError(
3730 !ToLocal<String>(i::Object::ToString(isolate, obj), &result);
3740 Utils::ToLocal(i::Object::NoSideEffectsToString(isolate, obj));
3751 !ToLocal<Object>(i::Object::ToObject(isolate, obj), &result);
3762 !ToLocal<BigInt>(i::BigInt::FromObject(isolate, obj), &result);
3773 auto isolate = reinterpret_cast<i::Isolate*>(v8_isolate);
3774 ASSERT_NO_SCRIPT_NO_EXCEPTION(isolate);
3776 isolate->factory()->ToBoolean(BooleanValue(v8_isolate)));
3785 !ToLocal<Number>(i::Object::ToNumber(isolate, obj), &result);
3796 !ToLocal<Integer>(i::Object::ToInteger(isolate, obj), &result);
3807 !ToLocal<Int32>(i::Object::ToInt32(isolate, obj), &result);
3818 !ToLocal<Uint32>(i::Object::ToUint32(isolate, obj), &result);
3823 i::Address i::DecodeExternalPointerImpl(const i::Isolate* isolate,
3826 return i::DecodeExternalPointer(isolate, encoded_pointer, tag);
3833 bool i::ShouldThrowOnError(i::Isolate* isolate) {
3834 return i::GetShouldThrow(isolate, Nothing<i::ShouldThrow>()) ==
3846 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(external_isolate);
3847 Utils::ApiCheck(isolate != nullptr && !isolate->IsDead(),
4009 v8::Isolate* isolate, std::unique_ptr<v8::BackingStore> backing_store,
4011 i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
4152 auto isolate = reinterpret_cast<i::Isolate*>(context->GetIsolate());
4153 ENTER_V8(isolate, context, Value, NumberValue, Nothing<double>(),
4156 has_pending_exception = !i::Object::ToNumber(isolate, obj).ToHandle(&num);
4166 auto isolate = reinterpret_cast<i::Isolate*>(context->GetIsolate());
4167 ENTER_V8(isolate, context, Value, IntegerValue, Nothing<int64_t>(),
4170 has_pending_exception = !i::Object::ToInteger(isolate, obj).ToHandle(&num);
4178 auto isolate = reinterpret_cast<i::Isolate*>(context->GetIsolate());
4179 ENTER_V8(isolate, context, Value, Int32Value, Nothing<int32_t>(),
4182 has_pending_exception = !i::Object::ToInt32(isolate, obj).ToHandle(&num);
4191 auto isolate = reinterpret_cast<i::Isolate*>(context->GetIsolate());
4192 ENTER_V8(isolate, context, Value, Uint32Value, Nothing<uint32_t>(),
4195 has_pending_exception = !i::Object::ToUint32(isolate, obj).ToHandle(&num);
4210 !i::Object::ToString(isolate, self).ToHandle(&string_obj);
4217 value = i::Handle<i::Object>(i::Smi::FromInt(index), isolate);
4219 value = isolate->factory()->NewNumber(index);
4227 i::Isolate* isolate = Utils::OpenHandle(*context)->GetIsolate();
4228 ENTER_V8(isolate, context, Value, Equals, Nothing<bool>(), i::HandleScope);
4231 Maybe<bool> result = i::Object::Equals(isolate, self, other);
4250 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(external_isolate);
4251 ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate);
4252 API_RCS_SCOPE(isolate, Value, TypeOf);
4253 return Utils::ToLocal(i::Object::TypeOf(isolate, Utils::OpenHandle(this)));
4258 auto isolate = reinterpret_cast<i::Isolate*>(context->GetIsolate());
4259 ENTER_V8(isolate, context, Value, InstanceOf, Nothing<bool>(),
4265 !i::Object::InstanceOf(isolate, left, right).ToHandle(&result);
4267 return Just(result->IsTrue(isolate));
4272 auto isolate = reinterpret_cast<i::Isolate*>(context->GetIsolate());
4273 ENTER_V8(isolate, context, Object, Set, Nothing<bool>(), i::HandleScope);
4278 i::Runtime::SetObjectProperty(isolate, self, key_obj, value_obj,
4288 auto isolate = reinterpret_cast<i::Isolate*>(context->GetIsolate());
4289 ENTER_V8(isolate, context, Object, Set, Nothing<bool>(), i::HandleScope);
4292 has_pending_exception = i::Object::SetElement(isolate, self, index, value_obj,
4302 auto isolate = reinterpret_cast<i::Isolate*>(context->GetIsolate());
4307 i::PropertyKey lookup_key(isolate, key_obj);
4308 i::LookupIterator it(isolate, self, lookup_key, i::LookupIterator::OWN);
4310 ENTER_V8(isolate, context, Object, CreateDataProperty, Nothing<bool>(),
4318 ENTER_V8_NO_SCRIPT(isolate, context, Object, CreateDataProperty,
4331 auto isolate = reinterpret_cast<i::Isolate*>(context->GetIsolate());
4335 i::LookupIterator it(isolate, self, index, self, i::LookupIterator::OWN);
4337 ENTER_V8(isolate, context, Object, CreateDataProperty, Nothing<bool>(),
4345 ENTER_V8_NO_SCRIPT(isolate, context, Object, CreateDataProperty,
4452 auto isolate = reinterpret_cast<i::Isolate*>(context->GetIsolate());
4464 ENTER_V8(isolate, context, Object, DefineOwnProperty, Nothing<bool>(),
4467 isolate, self, key_obj, &desc, Just(i::kDontThrow));
4474 ENTER_V8_NO_SCRIPT(isolate, context, Object, DefineOwnProperty,
4477 isolate, self, key_obj, &desc, Just(i::kDontThrow));
4486 auto isolate = reinterpret_cast<i::Isolate*>(context->GetIsolate());
4487 ENTER_V8(isolate, context, Object, DefineOwnProperty, Nothing<bool>(),
4493 isolate, self, key_obj, &descriptor.get_private()->desc,
4501 auto isolate = reinterpret_cast<i::Isolate*>(context->GetIsolate());
4502 ENTER_V8_NO_SCRIPT(isolate, context, Object, SetPrivate, Nothing<bool>(),
4514 isolate, i::Handle<i::JSProxy>::cast(self),
4518 i::LookupIterator it(isolate, js_object, key_obj, js_object);
4533 !i::Runtime::GetObjectProperty(isolate, self, key_obj).ToHandle(&result);
4543 !i::JSReceiver::GetElement(isolate, self, index).ToHandle(&result);
4555 auto isolate = reinterpret_cast<i::Isolate*>(context->GetIsolate());
4556 ENTER_V8(isolate, context, Object, GetPropertyAttributes,
4562 !i::Object::ToString(isolate, key_obj).ToHandle(&key_obj);
4583 i::JSReceiver::GetOwnPropertyDescriptor(isolate, obj, key_name, &desc);
4587 return v8::Undefined(reinterpret_cast<v8::Isolate*>(isolate));
4589 RETURN_ESCAPED(Utils::ToLocal(desc.ToObject(isolate)));
4594 auto isolate = self->GetIsolate();
4595 i::PrototypeIterator iter(isolate, self);
4601 auto isolate = reinterpret_cast<i::Isolate*>(context->GetIsolate());
4605 ENTER_V8(isolate, context, Object, SetPrototype, Nothing<bool>(),
4609 TryCatch try_catch(reinterpret_cast<v8::Isolate*>(isolate));
4611 i::JSProxy::SetPrototype(isolate, i::Handle<i::JSProxy>::cast(self),
4616 ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate);
4618 i::JSObject::SetPrototype(isolate, i::Handle<i::JSObject>::cast(self),
4621 isolate->clear_pending_exception();
4631 auto isolate = self->GetIsolate();
4632 i::PrototypeIterator iter(isolate, *self, i::kStartAtReceiver);
4640 return Utils::ToLocal(i::handle(iter.GetCurrent<i::JSObject>(), isolate));
4658 isolate, static_cast<i::KeyCollectionMode>(mode),
4667 self->map().instance_descriptors(isolate).enum_cache().keys() !=
4669 auto result = isolate->factory()->NewJSArrayWithElements(value);
4690 i::Execution::CallBuiltin(isolate, isolate->object_to_string(), self, 0,
4708 auto isolate = reinterpret_cast<i::Isolate*>(context->GetIsolate());
4709 ENTER_V8(isolate, context, Object, SetIntegrityLevel, Nothing<bool>(),
4722 auto isolate = reinterpret_cast<i::Isolate*>(context->GetIsolate());
4726 ENTER_V8(isolate, context, Object, Delete, Nothing<bool>(), i::HandleScope);
4728 isolate, self, key_obj, i::LanguageMode::kSloppy);
4735 ENTER_V8_NO_SCRIPT(isolate, context, Object, Delete, Nothing<bool>(),
4738 isolate, self, key_obj, i::LanguageMode::kSloppy);
4747 auto isolate = reinterpret_cast<i::Isolate*>(context->GetIsolate());
4750 ENTER_V8_NO_SCRIPT(isolate, context, Object, Delete, Nothing<bool>(),
4755 isolate, self, key_obj, i::LanguageMode::kSloppy);
4762 auto isolate = reinterpret_cast<i::Isolate*>(context->GetIsolate());
4763 ENTER_V8(isolate, context, Object, Has, Nothing<bool>(), i::HandleScope);
4770 maybe = i::JSReceiver::HasElement(isolate, self, index);
4774 if (i::Object::ToName(isolate, key_obj).ToHandle(&name)) {
4775 maybe = i::JSReceiver::HasProperty(isolate, self, name);
4788 auto isolate = reinterpret_cast<i::Isolate*>(context->GetIsolate());
4789 ENTER_V8(isolate, context, Object, Delete, Nothing<bool>(), i::HandleScope);
4798 auto isolate = reinterpret_cast<i::Isolate*>(context->GetIsolate());
4799 ENTER_V8(isolate, context, Object, Has, Nothing<bool>(), i::HandleScope);
4801 auto maybe = i::JSReceiver::HasElement(isolate, self, index);
4814 auto isolate = reinterpret_cast<i::Isolate*>(context->GetIsolate());
4815 ENTER_V8_NO_SCRIPT(isolate, context, Object, SetAccessor, Nothing<bool>(),
4822 MakeAccessorInfo(isolate, name, getter, setter, data, settings, signature,
4830 i::Handle<i::Name> accessor_name(info->name(), isolate);
4836 if (result->IsUndefined(isolate)) return Just(false);
4863 i::Isolate* isolate = self->GetIsolate();
4864 ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate);
4865 i::HandleScope scope(isolate);
4869 if (setter_i.is_null()) setter_i = isolate->factory()->null_value();
4899 auto isolate = reinterpret_cast<i::Isolate*>(context->GetIsolate());
4900 ENTER_V8(isolate, context, Object, HasOwnProperty, Nothing<bool>(),
4904 auto result = i::JSReceiver::HasOwnProperty(isolate, self, key_val);
4911 auto isolate = reinterpret_cast<i::Isolate*>(context->GetIsolate());
4912 ENTER_V8(isolate, context, Object, HasOwnProperty, Nothing<bool>(),
4915 auto result = i::JSReceiver::HasOwnProperty(isolate, self, index);
4923 auto isolate = reinterpret_cast<i::Isolate*>(context->GetIsolate());
4924 ENTER_V8_NO_SCRIPT(isolate, context, Object, HasRealNamedProperty,
4930 isolate, i::Handle<i::JSObject>::cast(self), key_val);
4938 auto isolate = reinterpret_cast<i::Isolate*>(context->GetIsolate());
4939 ENTER_V8_NO_SCRIPT(isolate, context, Object, HasRealIndexedProperty,
4944 isolate, i::Handle<i::JSObject>::cast(self), index);
4952 auto isolate = reinterpret_cast<i::Isolate*>(context->GetIsolate());
4953 ENTER_V8_NO_SCRIPT(isolate, context, Object, HasRealNamedCallbackProperty,
4959 isolate, i::Handle<i::JSObject>::cast(self), key_val);
4984 i::PrototypeIterator iter(isolate, self);
4988 i::PropertyKey lookup_key(isolate, key_obj);
4989 i::LookupIterator it(isolate, self, lookup_key, proto,
5001 auto isolate = reinterpret_cast<i::Isolate*>(context->GetIsolate());
5002 ENTER_V8(isolate, context, Object,
5008 i::PrototypeIterator iter(isolate, self);
5012 i::PropertyKey lookup_key(isolate, key_obj);
5013 i::LookupIterator it(isolate, self, lookup_key, proto,
5029 i::PropertyKey lookup_key(isolate, key_obj);
5030 i::LookupIterator it(isolate, self, lookup_key, self,
5041 auto isolate = reinterpret_cast<i::Isolate*>(context->GetIsolate());
5042 ENTER_V8(isolate, context, Object, GetRealNamedPropertyAttributes,
5046 i::PropertyKey lookup_key(isolate, key_obj);
5047 i::LookupIterator it(isolate, self, lookup_key, self,
5062 auto isolate = self->GetIsolate();
5063 ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate);
5064 i::Handle<i::JSObject> result = isolate->factory()->CopyJSObject(self);
5110 auto isolate = self->GetIsolate();
5111 ASSERT_NO_SCRIPT_NO_EXCEPTION(isolate);
5112 i::HandleScope scope(isolate);
5113 return self->GetOrCreateIdentityHash(isolate).value();
5140 auto isolate = reinterpret_cast<i::Isolate*>(context->GetIsolate());
5141 TRACE_EVENT_CALL_STATS_SCOPED(isolate, "v8", "V8.Execute");
5142 ENTER_V8(isolate, context, Object, CallAsFunction, MaybeLocal<Value>(),
5144 i::TimerEventScope<i::TimerEventExecute> timer_scope(isolate);
5145 i::NestedTimedHistogramScope execute_timer(isolate->counters()->execute(),
5146 isolate);
5153 i::Execution::Call(isolate, self, recv_obj, argc, args), &result);
5160 auto isolate = reinterpret_cast<i::Isolate*>(context->GetIsolate());
5161 TRACE_EVENT_CALL_STATS_SCOPED(isolate, "v8", "V8.Execute");
5162 ENTER_V8(isolate, context, Object, CallAsConstructor, MaybeLocal<Value>(),
5164 i::TimerEventScope<i::TimerEventExecute> timer_scope(isolate);
5165 i::NestedTimedHistogramScope execute_timer(isolate->counters()->execute(),
5166 isolate);
5172 i::Execution::New(isolate, self, self, argc, args), &result);
5181 i::Isolate* isolate = Utils::OpenHandle(*context)->GetIsolate();
5182 API_RCS_SCOPE(isolate, Function, New);
5183 ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate);
5185 FunctionTemplateNew(isolate, callback, data, Local<Signature>(), length,
5199 auto isolate = reinterpret_cast<i::Isolate*>(context->GetIsolate());
5200 TRACE_EVENT_CALL_STATS_SCOPED(isolate, "v8", "V8.Execute");
5201 ENTER_V8(isolate, context, Function, NewInstance, MaybeLocal<Object>(),
5203 i::TimerEventScope<i::TimerEventExecute> timer_scope(isolate);
5204 i::NestedTimedHistogramScope execute_timer(isolate->counters()->execute(),
5205 isolate);
5210 isolate->debug_execution_mode() == i::DebugInfo::kSideEffects;
5227 i::Execution::New(isolate, self, self, argc, args), &result);
5250 auto isolate = reinterpret_cast<i::Isolate*>(context->GetIsolate());
5251 TRACE_EVENT_CALL_STATS_SCOPED(isolate, "v8", "V8.Execute");
5252 ENTER_V8(isolate, context, Function, Call, MaybeLocal<Value>(),
5254 i::TimerEventScope<i::TimerEventExecute> timer_scope(isolate);
5255 i::NestedTimedHistogramScope execute_timer(isolate->counters()->execute(),
5256 isolate);
5265 i::Execution::Call(isolate, self, recv_obj, argc, args), &result);
5280 i::Isolate* isolate = self->GetIsolate();
5284 ASSIGN_RETURN_ON_EXCEPTION_VALUE(isolate, name,
5285 i::JSBoundFunction::GetName(isolate, func),
5291 return Utils::ToLocal(handle(func->shared().Name(), isolate));
5293 return ToApiHandle<Primitive>(isolate->factory()->undefined_value());
5320 auto isolate = reinterpret_cast<v8::Isolate*>(self->GetIsolate());
5321 if (!self->IsJSFunction()) return v8::ScriptOrigin(isolate, Local<Value>());
5328 return v8::ScriptOrigin(isolate, Local<Value>());
5365 i::Isolate* isolate = sfi.GetIsolate();
5366 return ToApiHandle<UnboundScript>(i::handle(sfi, isolate));
5393 i::Execution::CallBuiltin(isolate, isolate->function_to_string(), self, 0,
5532 int String::Utf8Length(Isolate* isolate) const {
5534 str = i::String::Flatten(reinterpret_cast<i::Isolate*>(isolate), str);
5687 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate);
5688 API_RCS_SCOPE(isolate, String, WriteUtf8);
5689 ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate);
5690 str = i::String::Flatten(isolate, str);
5703 static inline int WriteHelper(i::Isolate* isolate, const String* string,
5706 API_RCS_SCOPE(isolate, String, Write);
5707 ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate);
5710 str = i::String::Flatten(isolate, str);
5723 int String::WriteOneByte(Isolate* isolate, uint8_t* buffer, int start,
5725 return WriteHelper(reinterpret_cast<i::Isolate*>(isolate), this, buffer,
5729 int String::Write(Isolate* isolate, uint16_t* buffer, int start, int length,
5731 return WriteHelper(reinterpret_cast<i::Isolate*>(isolate), this, buffer,
5807 internal::Isolate* isolate = I::GetIsolateForSandbox(str.ptr());
5809 isolate, str.ptr(), I::kStringResourceOffset,
5851 internal::Isolate* isolate = I::GetIsolateForSandbox(string);
5853 I::ReadExternalPointerField(isolate, string, I::kStringResourceOffset,
5875 Local<Value> Symbol::Description(Isolate* isolate) const {
5878 reinterpret_cast<i::Isolate*>(isolate));
5887 i::Isolate* isolate = i::GetIsolateFromWritableObject(*i_sym);
5888 return sym->Description(reinterpret_cast<Isolate*>(isolate));
6262 i::Isolate* isolate, i::MaybeHandle<i::JSGlobalProxy> maybe_global_proxy,
6267 return isolate->bootstrapper()->CreateEnvironment(
6276 i::Isolate* isolate, i::MaybeHandle<i::JSGlobalProxy> maybe_global_proxy,
6283 return isolate->bootstrapper()->NewRemoteContext(maybe_global_proxy,
6290 i::Isolate* isolate, v8::ExtensionConfiguration* extensions,
6298 ENTER_V8_FOR_NEW_CONTEXT(isolate);
6303 isolate->factory()->undefined_value());
6305 isolate->factory()->undefined_value());
6311 global_constructor = EnsureConstructor(isolate, *global_template);
6315 ObjectTemplate::New(reinterpret_cast<v8::Isolate*>(isolate));
6316 proxy_constructor = EnsureConstructor(isolate, *proxy_template);
6321 isolate, proxy_constructor, Utils::OpenHandle(*global_template));
6329 if (!global_constructor->GetAccessCheckInfo().IsUndefined(isolate)) {
6331 isolate, proxy_constructor,
6332 i::handle(global_constructor->GetAccessCheckInfo(), isolate));
6337 isolate, global_constructor,
6338 i::ReadOnlyRoots(isolate).undefined_value_handle());
6345 if (!global_constructor->GetNamedPropertyHandler().IsUndefined(isolate)) {
6347 handle(global_constructor->GetNamedPropertyHandler(), isolate);
6349 isolate, global_constructor,
6350 i::ReadOnlyRoots(isolate).noop_interceptor_info_handle());
6353 isolate)) {
6355 handle(global_constructor->GetIndexedPropertyHandler(), isolate);
6357 isolate, global_constructor,
6358 i::ReadOnlyRoots(isolate).noop_interceptor_info_handle());
6369 result = invoke.Invoke(isolate, maybe_proxy, proxy_template, extensions,
6378 isolate, global_constructor,
6379 i::handle(proxy_constructor->GetAccessCheckInfo(), isolate));
6383 isolate, global_constructor, named_interceptor);
6385 isolate, global_constructor, indexed_interceptor);
6399 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(external_isolate);
6402 // Sanity-check that the isolate is initialized and usable.
6403 CHECK(isolate->builtins()->code(i::Builtin::kIllegal).IsCodeT());
6405 TRACE_EVENT_CALL_STATS_SCOPED(isolate, "v8", "V8.NewContext");
6406 API_RCS_SCOPE(isolate, Context, New);
6407 i::HandleScope scope(isolate);
6411 isolate, extensions, global_template, global_object,
6414 if (isolate->has_pending_exception()) isolate->clear_pending_exception();
6450 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(external_isolate);
6451 API_RCS_SCOPE(isolate, Context, NewRemoteContext);
6452 i::HandleScope scope(isolate);
6454 EnsureConstructor(isolate, *global_template);
6460 isolate);
6465 isolate, nullptr, global_template, global_object, 0,
6468 if (isolate->has_pending_exception()) isolate->clear_pending_exception();
6487 i::Isolate* isolate = env->GetIsolate();
6489 i::Handle<i::Object> token_handle(security_token, isolate);
6507 i::Isolate* isolate = context->GetIsolate();
6508 i::Handle<i::Object> global(context->global_proxy(), isolate);
6513 global = i::Handle<i::Object>(context->global_object(), isolate);
6520 i::Isolate* isolate = context->GetIsolate();
6521 ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate);
6522 isolate->DetachGlobal(context);
6527 i::Isolate* isolate = context->GetIsolate();
6528 i::Handle<i::JSObject> binding(context->extras_binding_object(), isolate);
6534 i::Isolate* isolate = context->GetIsolate();
6535 ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate);
6537 allow ? i::ReadOnlyRoots(isolate).true_value()
6538 : i::ReadOnlyRoots(isolate).false_value());
6555 i::Isolate* isolate = context->GetIsolate();
6558 i::ReadOnlyRoots(isolate).undefined_value());
6560 SET_FIELD_WRAPPED(isolate, context, set_script_execution_callback,
6567 i::Isolate* isolate = context->GetIsolate();
6570 isolate);
6576 i::Isolate* isolate = context->GetIsolate();
6578 data = v8::Undefined(reinterpret_cast<v8::Isolate*>(isolate));
6589 i::Isolate* isolate = context->GetIsolate();
6591 i::Handle<i::Object> init = isolate->factory()->undefined_value();
6592 i::Handle<i::Object> before = isolate->factory()->undefined_value();
6593 i::Handle<i::Object> after = isolate->factory()->undefined_value();
6594 i::Handle<i::Object> resolve = isolate->factory()->undefined_value();
6615 isolate->SetHasContextPromiseHooks(has_hook);
6628 Isolate* isolate, metrics::Recorder::ContextId id) {
6629 i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
6636 i::Isolate* isolate = i_context->GetIsolate();
6637 return isolate->GetOrRegisterRecorderContextId(
6638 handle(i_context->native_context(), isolate));
6641 metrics::LongTaskStats metrics::LongTaskStats::Get(v8::Isolate* isolate) {
6642 i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
6647 i::Address* GetSerializedDataFromFixedArray(i::Isolate* isolate,
6652 if (!object.IsTheHole(isolate)) {
6653 list.set_the_hole(isolate, int_index);
6658 while (last >= 0 && list.is_the_hole(isolate, last)) last--;
6659 if (last != -1) list.Shrink(isolate, last + 1);
6660 return i::Handle<i::Object>(object, isolate).location();
6679 i::ApiNatives::InstantiateObject(isolate, self), &result);
6720 i::Isolate* isolate = self->GetIsolate();
6721 API_RCS_SCOPE(isolate, FunctionTemplate, NewRemoteInstance);
6722 i::HandleScope scope(isolate);
6724 EnsureConstructor(isolate, *InstanceTemplate());
6729 i::AccessCheckInfo::cast(constructor->GetAccessCheckInfo()), isolate);
6737 if (isolate->has_pending_exception()) {
6738 isolate->OptionalRescheduleException(true);
6774 Local<External> v8::External::New(Isolate* isolate, void* value) {
6781 i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
6848 #define NEW_STRING(isolate, class_name, function_name, Char, data, type, \
6852 result = String::Empty(isolate); \
6856 i::Isolate* i_isolate = reinterpret_cast<internal::Isolate*>(isolate); \
6867 Local<String> String::NewFromUtf8Literal(Isolate* isolate, const char* literal,
6870 i::Isolate* i_isolate = reinterpret_cast<internal::Isolate*>(isolate);
6880 MaybeLocal<String> String::NewFromUtf8(Isolate* isolate, const char* data,
6882 NEW_STRING(isolate, String, NewFromUtf8, char, data, type, length);
6886 MaybeLocal<String> String::NewFromOneByte(Isolate* isolate, const uint8_t* data,
6888 NEW_STRING(isolate, String, NewFromOneByte, uint8_t, data, type, length);
6892 MaybeLocal<String> String::NewFromTwoByte(Isolate* isolate,
6895 NEW_STRING(isolate, String, NewFromTwoByte, uint16_t, data, type, length);
6901 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate);
6903 ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate);
6904 API_RCS_SCOPE(isolate, String, Concat);
6911 i::Handle<i::String> result = isolate->factory()
6918 Isolate* isolate, v8::String::ExternalStringResource* resource) {
6924 i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
6940 Isolate* isolate, v8::String::ExternalOneByteStringResource* resource) {
6946 i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
6976 i::Isolate* isolate = i::GetIsolateFromWritableObject(obj);
6977 ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate);
7003 i::Isolate* isolate = i::GetIsolateFromWritableObject(obj);
7004 ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate);
7039 Local<v8::Object> v8::Object::New(Isolate* isolate) {
7040 i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
7105 Local<v8::Object> v8::Object::New(Isolate* isolate,
7109 i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
7146 Local<v8::Value> v8::NumberObject::New(Isolate* isolate, double value) {
7147 i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
7164 Local<v8::Value> v8::BigIntObject::New(Isolate* isolate, int64_t value) {
7165 i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
7178 i::Isolate* isolate = js_primitive_wrapper->GetIsolate();
7179 API_RCS_SCOPE(isolate, BigIntObject, BigIntValue);
7181 i::BigInt::cast(js_primitive_wrapper->value()), isolate));
7184 Local<v8::Value> v8::BooleanObject::New(Isolate* isolate, bool value) {
7185 i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
7200 i::Isolate* isolate = js_primitive_wrapper.GetIsolate();
7201 API_RCS_SCOPE(isolate, BooleanObject, BooleanValue);
7202 return js_primitive_wrapper.value().IsTrue(isolate);
7208 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate);
7209 API_RCS_SCOPE(isolate, StringObject, New);
7210 ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate);
7212 i::Object::ToObject(isolate, string).ToHandleChecked();
7220 i::Isolate* isolate = js_primitive_wrapper->GetIsolate();
7221 API_RCS_SCOPE(isolate, StringObject, StringValue);
7223 i::String::cast(js_primitive_wrapper->value()), isolate));
7226 Local<v8::Value> v8::SymbolObject::New(Isolate* isolate, Local<Symbol> value) {
7227 i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
7240 i::Isolate* isolate = js_primitive_wrapper->GetIsolate();
7241 API_RCS_SCOPE(isolate, SymbolObject, SymbolValue);
7243 i::Symbol::cast(js_primitive_wrapper->value()), isolate));
7254 i::JSDate::New(isolate->date_function(), isolate->date_function(), time),
7282 !ToLocal<RegExp>(i::JSRegExp::New(isolate, Utils::OpenHandle(*pattern),
7301 i::JSRegExp::New(isolate, Utils::OpenHandle(*pattern),
7346 i::RegExpUtils::RegExpExec(isolate, regexp, subject_string,
7347 isolate->factory()->undefined_value()),
7354 Local<v8::Array> v8::Array::New(Isolate* isolate, int length) {
7355 i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
7366 Local<v8::Array> v8::Array::New(Isolate* isolate, Local<Value>* elements,
7368 i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
7394 Local<v8::Map> v8::Map::New(Isolate* isolate) {
7395 i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
7409 i::Isolate* isolate = self->GetIsolate();
7410 API_RCS_SCOPE(isolate, Map, Clear);
7411 ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate);
7412 i::JSMap::Clear(isolate, self);
7421 !ToLocal<Value>(i::Execution::CallBuiltin(isolate, isolate->map_get(),
7436 !i::Execution::CallBuiltin(isolate, isolate->map_set(), self,
7444 auto isolate = reinterpret_cast<i::Isolate*>(context->GetIsolate());
7445 ENTER_V8(isolate, context, Map, Has, Nothing<bool>(), i::HandleScope);
7450 !i::Execution::CallBuiltin(isolate, isolate->map_has(), self,
7454 return Just(result->IsTrue(isolate));
7458 auto isolate = reinterpret_cast<i::Isolate*>(context->GetIsolate());
7459 ENTER_V8(isolate, context, Map, Delete, Nothing<bool>(), i::HandleScope);
7464 !i::Execution::CallBuiltin(isolate, isolate->map_delete(), self,
7468 return Just(result->IsTrue(isolate));
7484 i::Handle<i::JSArray> MapAsArray(i::Isolate* isolate, i::Object table_obj,
7486 i::Factory* factory = isolate->factory();
7488 isolate);
7500 i::Oddball the_hole = i::ReadOnlyRoots(isolate).the_hole_value();
7511 result->Shrink(isolate, result_index);
7520 i::Isolate* isolate = obj->GetIsolate();
7521 API_RCS_SCOPE(isolate, Map, AsArray);
7522 ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate);
7524 MapAsArray(isolate, obj->table(), 0, MapAsArrayKind::kEntries));
7527 Local<v8::Set> v8::Set::New(Isolate* isolate) {
7528 i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
7542 i::Isolate* isolate = self->GetIsolate();
7543 API_RCS_SCOPE(isolate, Set, Clear);
7544 ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate);
7545 i::JSSet::Clear(isolate, self);
7554 !i::Execution::CallBuiltin(isolate, isolate->set_add(), self,
7562 auto isolate = reinterpret_cast<i::Isolate*>(context->GetIsolate());
7563 ENTER_V8(isolate, context, Set, Has, Nothing<bool>(), i::HandleScope);
7568 !i::Execution::CallBuiltin(isolate, isolate->set_has(), self,
7572 return Just(result->IsTrue(isolate));
7576 auto isolate = reinterpret_cast<i::Isolate*>(context->GetIsolate());
7577 ENTER_V8(isolate, context, Set, Delete, Nothing<bool>(), i::HandleScope);
7582 !i::Execution::CallBuiltin(isolate, isolate->set_delete(), self,
7586 return Just(result->IsTrue(isolate));
7590 i::Handle<i::JSArray> SetAsArray(i::Isolate* isolate, i::Object table_obj,
7592 i::Factory* factory = isolate->factory();
7594 isolate);
7604 i::Oddball the_hole = i::ReadOnlyRoots(isolate).the_hole_value();
7615 result->Shrink(isolate, result_index);
7623 i::Isolate* isolate = obj->GetIsolate();
7624 API_RCS_SCOPE(isolate, Set, AsArray);
7625 ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate);
7627 SetAsArray(isolate, obj->table(), 0, SetAsArrayKind::kValues));
7634 !ToLocal<Promise::Resolver>(isolate->factory()->NewJSPromise(), &result);
7646 auto isolate = reinterpret_cast<i::Isolate*>(context->GetIsolate());
7647 ENTER_V8(isolate, context, Promise_Resolver, Resolve, Nothing<bool>(),
7664 auto isolate = reinterpret_cast<i::Isolate*>(context->GetIsolate());
7665 ENTER_V8(isolate, context, Promise_Resolver, Reject, Nothing<bool>(),
7684 i::Handle<i::Object> argv[] = {isolate->factory()->undefined_value(),
7691 !i::Execution::CallBuiltin(isolate, isolate->promise_then(), self,
7705 !i::Execution::CallBuiltin(isolate, isolate->promise_then(), self,
7721 !i::Execution::CallBuiltin(isolate, isolate->promise_then(), self,
7730 i::Isolate* isolate = promise.GetIsolate();
7731 API_RCS_SCOPE(isolate, Promise, HasRejectHandler);
7732 ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate);
7739 i::Isolate* isolate = promise->GetIsolate();
7740 API_RCS_SCOPE(isolate, Promise, Result);
7744 i::Handle<i::Object> result(js_promise->result(), isolate);
7794 !ToLocal<Proxy>(i::JSProxy::New(isolate, target, handler), &result);
7856 Isolate* isolate, const CompiledWasmModule& compiled_module) {
7858 i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
7871 Isolate* isolate, MemorySpan<const uint8_t> wire_bytes) {
7875 i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
7902 Isolate* isolate) {
7952 i::Isolate* isolate = obj->GetIsolate();
7955 API_RCS_SCOPE(isolate, ArrayBuffer, Detach);
7956 ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate);
7965 Local<ArrayBuffer> v8::ArrayBuffer::New(Isolate* isolate, size_t byte_length) {
7966 i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
7984 Isolate* isolate, std::shared_ptr<BackingStore> backing_store) {
7987 i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
8001 Isolate* isolate, size_t byte_length) {
8002 i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
8049 i::Isolate* isolate = self->GetIsolate();
8052 i::Handle<i::JSTypedArray> array(i::JSTypedArray::cast(*self), isolate);
8056 i::Handle<i::JSDataView> data_view(i::JSDataView::cast(*self), isolate);
8093 i::Isolate* isolate = Utils::OpenHandle(*array_buffer)->GetIsolate(); \
8094 API_RCS_SCOPE(isolate, Type##Array, New); \
8095 ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate); \
8103 i::Handle<i::JSTypedArray> obj = isolate->factory()->NewJSTypedArray( \
8111 i::Isolate* isolate = \
8113 API_RCS_SCOPE(isolate, Type##Array, New); \
8114 ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate); \
8124 i::Handle<i::JSTypedArray> obj = isolate->factory()->NewJSTypedArray( \
8135 i::Isolate* isolate = buffer->GetIsolate();
8136 API_RCS_SCOPE(isolate, DataView, New);
8137 ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate);
8139 isolate->factory()->NewJSDataView(buffer, byte_offset, byte_length);
8147 i::Isolate* isolate = buffer->GetIsolate();
8148 API_RCS_SCOPE(isolate, DataView, New);
8149 ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate);
8151 isolate->factory()->NewJSDataView(buffer, byte_offset, byte_length);
8160 Local<SharedArrayBuffer> v8::SharedArrayBuffer::New(Isolate* isolate,
8163 i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
8183 Isolate* isolate, std::shared_ptr<BackingStore> backing_store) {
8187 i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
8200 Isolate* isolate, size_t byte_length) {
8201 i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
8227 Local<Symbol> v8::Symbol::New(Isolate* isolate, Local<String> name) {
8228 i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
8236 Local<Symbol> v8::Symbol::For(Isolate* isolate, Local<String> name) {
8237 i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
8243 Local<Symbol> v8::Symbol::ForApi(Isolate* isolate, Local<String> name) {
8244 i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
8264 Local<Symbol> v8::Symbol::Get##Name(Isolate* isolate) { \
8265 i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate); \
8274 Local<Private> v8::Private::New(Isolate* isolate, Local<String> name) {
8275 i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
8284 Local<Private> v8::Private::ForApi(Isolate* isolate, Local<String> name) {
8285 i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
8292 Local<Number> v8::Number::New(Isolate* isolate, double value) {
8293 i::Isolate* internal_isolate = reinterpret_cast<i::Isolate*>(isolate);
8303 Local<Integer> v8::Integer::New(Isolate* isolate, int32_t value) {
8304 i::Isolate* internal_isolate = reinterpret_cast<i::Isolate*>(isolate);
8314 Local<Integer> v8::Integer::NewFromUnsigned(Isolate* isolate, uint32_t value) {
8315 i::Isolate* internal_isolate = reinterpret_cast<i::Isolate*>(isolate);
8318 return Integer::New(isolate, static_cast<int32_t>(value));
8325 Local<BigInt> v8::BigInt::New(Isolate* isolate, int64_t value) {
8326 i::Isolate* internal_isolate = reinterpret_cast<i::Isolate*>(isolate);
8332 Local<BigInt> v8::BigInt::NewFromUnsigned(Isolate* isolate, uint64_t value) {
8333 i::Isolate* internal_isolate = reinterpret_cast<i::Isolate*>(isolate);
8342 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(context->GetIsolate());
8343 ENTER_V8_NO_SCRIPT(isolate, context, BigInt, NewFromWords,
8346 i::BigInt::FromWords64(isolate, sign_bit, word_count, words);
8386 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
8387 isolate->SetIdle(is_idle);
8391 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
8392 return isolate->array_buffer_allocator();
8396 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
8397 return !isolate->context().is_null();
8401 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
8402 isolate->ClearKeptObjects();
8406 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
8407 i::Context context = isolate->context();
8411 return Utils::ToLocal(i::Handle<i::Context>(native_context, isolate));
8415 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
8417 isolate->handle_scope_implementer()->LastEnteredOrMicrotaskContext();
8424 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
8425 i::Handle<i::Context> context = isolate->GetIncumbentContext();
8434 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
8435 ENTER_V8_DO_NOT_USE(isolate);
8439 isolate->ScheduleThrow(i::ReadOnlyRoots(isolate).undefined_value());
8441 isolate->ScheduleThrow(*Utils::OpenHandle(*value));
8443 return v8::Undefined(reinterpret_cast<v8::Isolate*>(isolate));
8448 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
8449 isolate->heap()->AddGCPrologueCallback(callback, gc_type, data);
8454 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
8455 isolate->heap()->RemoveGCPrologueCallback(callback, data);
8460 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
8461 isolate->heap()->AddGCEpilogueCallback(callback, gc_type, data);
8466 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
8467 isolate->heap()->RemoveGCEpilogueCallback(callback, data);
8470 static void CallGCCallbackWithoutData(Isolate* isolate, GCType type,
8472 reinterpret_cast<Isolate::GCCallback>(data)(isolate, type, flags);
8496 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
8497 CHECK_NULL(isolate->heap()->cpp_heap());
8498 isolate->heap()->SetEmbedderHeapTracer(tracer);
8502 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
8503 return isolate->heap()->GetEmbedderHeapTracer();
8507 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
8508 isolate->heap()->SetEmbedderRootsHandler(handler);
8512 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
8514 isolate->heap()->AttachCppHeap(cpp_heap);
8518 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
8519 isolate->heap()->DetachCppHeap();
8523 const i::Isolate* isolate = reinterpret_cast<const i::Isolate*>(this);
8524 return isolate->heap()->cpp_heap();
8529 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
8530 isolate->heap()->SetGetExternallyAllocatedMemoryInBytesCallback(callback);
8534 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
8535 isolate->stack_guard()->RequestTerminateExecution();
8539 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
8540 return IsExecutionTerminatingCheck(isolate);
8544 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
8545 isolate->stack_guard()->ClearTerminateExecution();
8546 isolate->CancelTerminateExecution();
8550 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
8551 isolate->RequestInterrupt(callback, data);
8556 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
8557 return i::wasm::GetWasmEngine()->HasRunningCompileJob(isolate);
8592 i::Isolate* isolate = i::Isolate::Current();
8593 return reinterpret_cast<Isolate*>(isolate);
8597 i::Isolate* isolate = i::Isolate::TryGetCurrent();
8598 return reinterpret_cast<Isolate*>(isolate);
8615 // This is separate so that tests can provide a different |isolate|.
8616 void Isolate::Initialize(Isolate* isolate,
8618 i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
8636 isolate->SetFatalErrorHandler(params.fatal_error_callback);
8640 isolate->SetOOMErrorHandler(params.oom_error_callback);
8644 isolate->SetCounterFunction(params.counter_lookup_callback);
8648 isolate->SetCreateHistogramFunction(params.create_histogram_callback);
8652 isolate->SetAddHistogramSampleFunction(
8672 Isolate::Scope isolate_scope(isolate);
8688 // because that is where we add the isolate to WasmEngine.
8691 isolate->SetJitCodeEventHandler(kJitCodeEventEnumExisting,
8704 ->GetForegroundTaskRunner(isolate)
8713 Isolate* isolate = Allocate();
8714 Initialize(isolate, params);
8715 return isolate;
8719 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
8720 if (!Utils::ApiCheck(!isolate->IsInUse(), "v8::Isolate::Dispose()",
8721 "Disposing the isolate that is entered by a thread.")) {
8724 i::Isolate::Delete(isolate);
8728 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
8729 isolate->DumpAndResetStats();
8733 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
8734 isolate->DiscardPerThreadDataForThisThread();
8738 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
8739 isolate->Enter();
8743 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
8744 isolate->Exit();
8749 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
8750 isolate->SetAbortOnUncaughtExceptionCallback(callback);
8755 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
8756 isolate->SetHostImportModuleDynamicallyCallback(callback);
8761 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
8762 isolate->SetHostImportModuleDynamicallyCallback(callback);
8767 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
8768 isolate->SetHostInitializeImportMetaObjectCallback(callback);
8773 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
8774 isolate->SetHostCreateShadowRealmContextCallback(callback);
8778 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
8779 isolate->SetPrepareStackTraceCallback(callback);
8783 Isolate* isolate,
8785 : on_failure_(on_failure), isolate_(isolate) {
8786 i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
8826 Isolate* isolate)
8827 : isolate_(isolate) {
8828 i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
8844 Isolate* isolate, MicrotaskQueue* microtask_queue)
8845 : isolate_(reinterpret_cast<i::Isolate*>(isolate)),
8858 Isolate::SafeForTerminationScope::SafeForTerminationScope(v8::Isolate* isolate)
8859 : isolate_(reinterpret_cast<i::Isolate*>(isolate)),
8875 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
8876 i::Heap* heap = isolate->heap();
8913 isolate->allocator()->GetCurrentMemoryUsage() +
8914 isolate->string_table()->GetCurrentMemoryUsage();
8918 isolate->heap()->backing_store_bytes() < SIZE_MAX
8919 ? static_cast<size_t>(isolate->heap()->backing_store_bytes())
8922 isolate->allocator()->GetMaxMemoryUsage();
8946 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
8947 i::Heap* heap = isolate->heap();
8978 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
8979 i::Heap* heap = isolate->heap();
8988 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
8989 i::Heap* heap = isolate->heap();
9014 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
9015 isolate->heap()->CollectCodeStatistics();
9017 code_statistics->code_and_metadata_size_ = isolate->code_and_metadata_size();
9019 isolate->bytecode_and_metadata_size();
9021 isolate->external_script_source_size();
9024 reinterpret_cast<i::Isolate*>(isolate));
9031 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
9032 return isolate->heap()->MeasureMemory(std::move(delegate), execution);
9036 Isolate* isolate, Local<Context> context,
9038 i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
9050 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
9051 if (i::TickSample::GetStackSample(isolate, ®s,
9062 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
9063 return isolate->global_handles()->GetAndResetGlobalHandleResetCount();
9090 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
9091 isolate->set_event_logger(that);
9096 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
9097 isolate->AddBeforeCallEnteredCallback(callback);
9102 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
9103 isolate->RemoveBeforeCallEnteredCallback(callback);
9108 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
9109 isolate->AddCallCompletedCallback(callback);
9113 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
9114 isolate->RemoveCallCompletedCallback(callback);
9122 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
9123 isolate->SetAtomicsWaitCallback(callback, data);
9127 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
9128 isolate->SetPromiseHook(hook);
9133 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
9134 isolate->SetPromiseRejectCallback(callback);
9139 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
9140 isolate->default_microtask_queue()->PerformCheckpoint(this);
9144 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
9149 handler_context = isolate->native_context();
9155 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
9156 isolate->default_microtask_queue()->EnqueueMicrotask(this, callback, data);
9160 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
9161 isolate->default_microtask_queue()->set_microtasks_policy(policy);
9165 i::Isolate* isolate =
9167 return isolate->default_microtask_queue()->microtasks_policy();
9173 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
9174 isolate->default_microtask_queue()->AddMicrotasksCompletedCallback(callback,
9180 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
9181 isolate->default_microtask_queue()->RemoveMicrotasksCompletedCallback(
9190 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
9191 isolate->counters()->ResetCounterFunction(callback);
9195 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
9196 isolate->counters()->ResetCreateHistogramFunction(callback);
9208 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
9209 isolate->metrics_recorder()->SetEmbedderRecorder(isolate, metrics_recorder);
9213 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
9214 isolate->SetAddCrashKeyCallback(callback);
9220 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
9222 return isolate->heap()->IdleNotification(deadline_in_seconds);
9226 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
9229 isolate->counters()->gc_low_memory_notification());
9231 isolate->heap()->CollectAllAvailableGarbage(
9237 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
9240 if (!isolate->context().is_null()) {
9244 i::HandleScope handle_scope(isolate);
9246 isolate->native_context());
9251 return isolate->heap()->NotifyContextDisposed(dependant_context);
9255 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
9256 return isolate->IsolateInForegroundNotification();
9260 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
9261 return isolate->IsolateInBackgroundNotification();
9265 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
9267 isolate->was_locker_ever_used()
9268 ? isolate->thread_manager()->IsLockedByCurrentThread()
9269 : i::ThreadId::Current() == isolate->thread_id();
9270 isolate->heap()->MemoryPressureNotification(level, on_isolate_thread);
9274 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
9275 isolate->AbortConcurrentOptimization(i::BlockingBehavior::kBlock);
9276 isolate->ClearSerializerData();
9280 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
9281 isolate->EnableMemorySavingsMode();
9285 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
9286 isolate->DisableMemorySavingsMode();
9290 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
9291 return isolate->SetRAILMode(rail_mode);
9295 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
9296 isolate->UpdateLoadStartTime();
9311 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
9312 // Ensure that logging is initialized for our isolate.
9313 isolate->InitializeLoggingAndCounters();
9314 isolate->logger()->SetCodeEventHandler(options, event_handler);
9318 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
9320 isolate->stack_guard()->SetStackLimit(stack_limit);
9324 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
9325 const base::AddressRegion& code_region = isolate->heap()->code_region();
9341 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
9348 i::Code js_entry = FromCodeT(isolate->builtins()->code(pair.first));
9363 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
9364 std::vector<MemoryRange>* code_pages = isolate->GetCodePages();
9382 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); \
9383 isolate->set_##InternalName(callback); \
9420 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
9421 isolate->InstallConditionalFeatures(Utils::OpenHandle(*context));
9424 i::WasmJs::InstallConditionalFeatures(isolate, Utils::OpenHandle(*context));
9431 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
9432 isolate->heap()->AddNearHeapLimitCallback(callback, data);
9437 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
9438 isolate->heap()->RemoveNearHeapLimitCallback(callback, heap_limit);
9444 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
9445 isolate->heap()->AutomaticallyRestoreInitialHeapLimit(threshold_percent);
9449 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
9450 return isolate->IsDead();
9460 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
9461 ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate);
9462 i::HandleScope scope(isolate);
9463 i::Handle<i::TemplateList> list = isolate->factory()->message_listeners();
9464 i::Handle<i::FixedArray> listener = isolate->factory()->NewFixedArray(3);
9466 isolate->factory()->NewForeign(FUNCTION_ADDR(that));
9468 listener->set(1, data.IsEmpty() ? i::ReadOnlyRoots(isolate).undefined_value()
9471 list = i::TemplateList::Add(isolate, list, listener);
9472 isolate->heap()->SetMessageListeners(*list);
9477 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
9478 ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate);
9479 i::HandleScope scope(isolate);
9481 i::TemplateList listeners = isolate->heap()->message_listeners();
9483 if (listeners.get(i).IsUndefined(isolate)) continue; // skip deleted ones
9487 listeners.set(i, i::ReadOnlyRoots(isolate).undefined_value());
9494 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
9495 isolate->SetFailedAccessCheckCallback(callback);
9500 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
9501 isolate->SetCaptureStackTraceForUncaughtExceptions(capture, frame_limit,
9506 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
9507 isolate->heap()->VisitExternalResources(visitor);
9511 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
9512 return isolate->IsInUse();
9516 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
9518 isolate->global_handles()->IterateAllRootsWithClassIds(visitor);
9522 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
9524 isolate->global_handles()->IterateYoungWeakRootsWithClassIds(visitor);
9528 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
9529 isolate->set_allow_atomics_wait(allow);
9559 bool v8::Object::IsCodeLike(v8::Isolate* isolate) const {
9560 i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
9568 std::unique_ptr<MicrotaskQueue> MicrotaskQueue::New(Isolate* isolate,
9571 i::MicrotaskQueue::New(reinterpret_cast<i::Isolate*>(isolate));
9577 MicrotasksScope::MicrotasksScope(Isolate* isolate, MicrotasksScope::Type type)
9578 : MicrotasksScope(isolate, nullptr, type) {}
9580 MicrotasksScope::MicrotasksScope(Isolate* isolate,
9583 : isolate_(reinterpret_cast<i::Isolate*>(isolate)),
9612 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate);
9613 auto* microtask_queue = isolate->default_microtask_queue();
9619 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate);
9620 auto* microtask_queue = isolate->default_microtask_queue();
9626 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate);
9627 auto* microtask_queue = isolate->default_microtask_queue();
9631 String::Utf8Value::Utf8Value(v8::Isolate* isolate, v8::Local<v8::Value> obj)
9634 i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
9637 Local<Context> context = isolate->GetCurrentContext();
9638 TryCatch try_catch(isolate);
9641 length_ = str->Utf8Length(isolate);
9643 str->WriteUtf8(isolate, str_);
9648 String::Value::Value(v8::Isolate* isolate, v8::Local<v8::Value> obj)
9651 i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
9654 Local<Context> context = isolate->GetCurrentContext();
9655 TryCatch try_catch(isolate);
9660 str->Write(isolate, str_);
9667 i::Isolate* isolate = i::Isolate::Current(); \
9668 API_RCS_SCOPE(isolate, NAME, New); \
9669 ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate); \
9672 i::HandleScope scope(isolate); \
9674 i::Handle<i::JSFunction> constructor = isolate->name##_function(); \
9675 error = *isolate->factory()->NewError(constructor, message); \
9677 i::Handle<i::Object> result(error, isolate); \
9692 Local<Message> Exception::CreateMessage(Isolate* isolate,
9695 i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
9706 i::Isolate* isolate = js_obj->GetIsolate();
9707 ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate);
9708 return Utils::StackTraceToLocal(isolate->GetDetailedStackTrace(js_obj));
9722 i::Isolate* isolate = object->GetIsolate();
9723 Isolate* v8_isolate = reinterpret_cast<Isolate*>(isolate);
9724 ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate);
9737 MapAsArray(isolate, it->table(), i::Smi::ToInt(it->index()), kind));
9746 SetAsArray(isolate, it->table(), i::Smi::ToInt(it->index()), kind));
9753 i::Isolate* isolate = node->isolate();
9756 isolate->factory()->InternalizeUtf8String(entry->name());
9773 i::Isolate* isolate = node->isolate();
9774 return ToApiHandle<String>(isolate->factory()->InternalizeUtf8String(
9857 i::Isolate* isolate = profile->top_down()->isolate();
9859 isolate->factory()->InternalizeUtf8String(profile->title()));
9919 CpuProfiler* CpuProfiler::New(Isolate* isolate,
9923 reinterpret_cast<i::Isolate*>(isolate), naming_mode, logging_mode));
9951 void CpuProfiler::CollectSample(Isolate* isolate) {
9952 i::CpuProfiler::CollectSample(reinterpret_cast<i::Isolate*>(isolate));
10027 void CpuProfiler::UseDetailedSourcePositionsForProfiling(Isolate* isolate) {
10028 reinterpret_cast<i::Isolate*>(isolate)
10084 CodeEventHandler::CodeEventHandler(Isolate* isolate) {
10086 new i::ExternalCodeEventListener(reinterpret_cast<i::Isolate*>(isolate));
10114 i::Isolate* isolate = edge->isolate();
10122 isolate->factory()->InternalizeUtf8String(edge->name()));
10126 isolate->factory()->NewNumberFromInt(edge->index()));
10152 i::Isolate* isolate = ToInternal(this)->isolate();
10154 isolate->factory()->InternalizeUtf8String(ToInternal(this)->name()));
10177 i::Isolate* isolate = ToInternal(this)->profiler()->isolate();
10178 if (isolate->heap_profiler()->GetSnapshotsCount() > 1 ||
10179 isolate->heap_profiler()->IsTakingSnapshot()) {
10183 isolate->heap_profiler()->DeleteAllSnapshots();
10321 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(isolate_);
10322 if (isolate->heap()->incremental_marking()->IsMarking()) {
10323 isolate->heap()->FinalizeIncrementalMarkingAtomically(
10362 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(isolate_);
10364 isolate->global_handles()->IterateTracedNodes(visitor);
10377 EmbedderStateScope::EmbedderStateScope(Isolate* isolate,
10380 : embedder_state_(new internal::EmbedderState(isolate, context, tag)) {}
10474 std::shared_ptr<WasmStreaming> WasmStreaming::Unpack(Isolate* isolate,
10577 std::unique_ptr<PersistentHandles> ph(new PersistentHandles(isolate()));
10603 ph->block_next_ = isolate()->handle_scope_data()->next;
10614 last_handle_before_deferred_block_ = isolate()->handle_scope_data()->next;
10622 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate());
10623 RCS_SCOPE(isolate, RuntimeCallCounterId::kAccessorGetterCallback);
10625 ExternalCallbackScope call_scope(isolate, getter_address);
10631 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate());
10632 RCS_SCOPE(isolate, RuntimeCallCounterId::kFunctionCallback);
10634 ExternalCallbackScope call_scope(isolate, callback_address);
10642 Isolate* isolate = finalization_registry->native_context().GetIsolate();
10643 RCS_SCOPE(isolate,
10649 if (IsExecutionTerminatingCheck(isolate)) return;
10651 CallDepthScope<true> call_depth_scope(isolate, api_context);
10652 VMState<OTHER> state(isolate);
10654 if (Execution::CallBuiltin(isolate,
10655 isolate->finalization_registry_cleanup_some(),