Lines Matching refs:Shell

460 CounterMap* Shell::counter_map_;
461 base::SharedMutex Shell::counter_mutex_;
462 base::OS::MemoryMappedFile* Shell::counters_file_ = nullptr;
463 CounterCollection Shell::local_counters_;
464 CounterCollection* Shell::counters_ = &local_counters_;
465 base::LazyMutex Shell::context_mutex_;
466 const base::TimeTicks Shell::kInitialTicks = base::TimeTicks::Now();
467 Global<Function> Shell::stringify_function_;
468 base::LazyMutex Shell::workers_mutex_;
469 bool Shell::allow_new_workers_ = true;
470 std::unordered_set<std::shared_ptr<Worker>> Shell::running_workers_;
471 std::atomic<bool> Shell::script_executed_{false};
472 std::atomic<bool> Shell::valid_fuzz_script_{false};
473 base::LazyMutex Shell::isolate_status_lock_;
474 std::map<v8::Isolate*, bool> Shell::isolate_status_;
475 std::map<v8::Isolate*, int> Shell::isolate_running_streaming_tasks_;
476 base::LazyMutex Shell::cached_code_mutex_;
478 Shell::cached_code_map_;
479 std::atomic<int> Shell::unhandled_promise_rejections_{0};
481 Global<Context> Shell::evaluation_context_;
482 ArrayBuffer::Allocator* Shell::array_buffer_allocator;
483 Isolate* Shell::shared_isolate = nullptr;
485 ShellOptions Shell::options;
486 base::OnceType Shell::quit_once_ = V8_ONCE_INIT;
488 ScriptCompiler::CachedData* Shell::LookupCodeCache(Isolate* isolate,
506 void Shell::StoreInCodeCache(Isolate* isolate, Local<Value> source,
554 Shell::NotifyStartStreamingTask(isolate_);
561 Shell::PostForegroundTask(isolate_, std::make_unique<FinishTask>(isolate_));
568 void Run() final { Shell::NotifyFinishStreamingTask(isolate_); }
622 MaybeLocal<T> Shell::CompileString(Isolate* isolate, Local<Context> context,
634 Shell::CompleteMessageLoop(isolate);
682 bool Shell::ExecuteString(Isolate* isolate, Local<String> source,
1019 MaybeLocal<Module> Shell::FetchModuleTree(Local<Module> referrer,
1075 export_names, Shell::JSONModuleEvaluationSteps);
1126 MaybeLocal<Value> Shell::JSONModuleEvaluationSteps(Local<Context> context,
1188 void Shell::ModuleResolutionSuccessCallback(
1208 void Shell::ModuleResolutionFailureCallback(
1227 MaybeLocal<Promise> Shell::HostImportModuleDynamically(
1249 isolate->EnqueueMicrotask(Shell::DoHostImportModuleDynamically, data);
1254 void Shell::HostInitializeImportMetaObject(Local<Context> context,
1272 MaybeLocal<Context> Shell::HostCreateShadowRealmContext(
1277 void Shell::DoHostImportModuleDynamically(void* import_data) {
1362 bool Shell::ExecuteModule(Isolate* isolate, const char* file_name) {
1372 // Shell::ReportException, because some errors (such as file errors) are
1408 Shell::CompleteMessageLoop(isolate);
1429 bool Shell::ExecuteWebSnapshot(Isolate* isolate, const char* file_name) {
1461 bool Shell::LoadJSON(Isolate* isolate, const char* file_name) {
1505 Shell::CreateSnapshotTemplate(isolate);
1574 Shell::ReportException(isolate_, message, value);
1675 void Shell::PerformanceNow(const v8::FunctionCallbackInfo<v8::Value>& args) {
1686 void Shell::PerformanceMeasureMemory(
1713 void Shell::RealmCurrent(const v8::FunctionCallbackInfo<v8::Value>& args) {
1722 void Shell::RealmOwner(const v8::FunctionCallbackInfo<v8::Value>& args) {
1748 void Shell::RealmGlobal(const v8::FunctionCallbackInfo<v8::Value>& args) {
1770 MaybeLocal<Context> Shell::CreateRealm(
1803 void Shell::DisposeRealm(const v8::FunctionCallbackInfo<v8::Value>& args,
1818 void Shell::RealmCreate(const v8::FunctionCallbackInfo<v8::Value>& args) {
1824 void Shell::RealmCreateAllowCrossRealmAccess(
1835 void Shell::RealmNavigate(const v8::FunctionCallbackInfo<v8::Value>& args) {
1864 void Shell::RealmDetachGlobal(const v8::FunctionCallbackInfo<v8::Value>& args) {
1881 void Shell::RealmDispose(const v8::FunctionCallbackInfo<v8::Value>& args) {
1895 void Shell::RealmSwitch(const v8::FunctionCallbackInfo<v8::Value>& args) {
1904 void Shell::RealmEval(const v8::FunctionCallbackInfo<v8::Value>& args) {
1942 void Shell::RealmSharedGet(Local<String> property,
1950 void Shell::RealmSharedSet(Local<String> property, Local<Value> value,
1959 void Shell::RealmTakeWebSnapshot(
2017 void Shell::RealmUseWebSnapshot(
2051 void Shell::LogGetAndStop(const v8::FunctionCallbackInfo<v8::Value>& args) {
2089 void Shell::TestVerifySourcePositions(
2186 void Shell::InstallConditionalFeatures(
2194 void Shell::AsyncHooksCreateHook(
2203 void Shell::AsyncHooksExecutionAsyncId(
2212 void Shell::AsyncHooksTriggerAsyncId(
2223 void Shell::EnableDebugger(const v8::FunctionCallbackInfo<v8::Value>& args) {
2227 void Shell::DisableDebugger(const v8::FunctionCallbackInfo<v8::Value>& args) {
2231 void Shell::SetPromiseHooks(const v8::FunctionCallbackInfo<v8::Value>& args) {
2298 void Shell::Print(const v8::FunctionCallbackInfo<v8::Value>& args) {
2302 void Shell::PrintErr(const v8::FunctionCallbackInfo<v8::Value>& args) {
2306 void Shell::WriteStdout(const v8::FunctionCallbackInfo<v8::Value>& args) {
2310 void Shell::ReadFile(const v8::FunctionCallbackInfo<v8::Value>& args) {
2328 Local<String> Shell::ReadFromStdin(Isolate* isolate) {
2365 void Shell::ExecuteFile(const v8::FunctionCallbackInfo<v8::Value>& args) {
2394 void Shell::SetTimeout(const v8::FunctionCallbackInfo<v8::Value>& args) {
2403 void Shell::ReadCodeTypeAndArguments(
2441 bool Shell::FunctionAndArgumentsToString(Local<Function> function,
2490 MaybeLocal<String> Shell::ReadSource(
2518 if (!Shell::ReadFile(isolate, *filename).ToLocal(&source)) {
2536 void Shell::WorkerNew(const v8::FunctionCallbackInfo<v8::Value>& args) {
2588 void Shell::WorkerPostMessage(const v8::FunctionCallbackInfo<v8::Value>& args) {
2607 Shell::SerializeValue(isolate, message, transfer);
2613 void Shell::WorkerGetMessage(const v8::FunctionCallbackInfo<v8::Value>& args) {
2625 if (Shell::DeserializeValue(isolate, std::move(data)).ToLocal(&value)) {
2631 void Shell::WorkerTerminate(const v8::FunctionCallbackInfo<v8::Value>& args) {
2640 void Shell::WorkerTerminateAndWait(
2653 void Shell::QuitOnce(v8::FunctionCallbackInfo<v8::Value>* args) {
2672 void Shell::Quit(const v8::FunctionCallbackInfo<v8::Value>& args) {
2677 void Shell::WaitUntilDone(const v8::FunctionCallbackInfo<v8::Value>& args) {
2681 void Shell::NotifyDone(const v8::FunctionCallbackInfo<v8::Value>& args) {
2685 void Shell::Version(const v8::FunctionCallbackInfo<v8::Value>& args) {
2699 void Shell::Fuzzilli(const v8::FunctionCallbackInfo<v8::Value>& args) {
2742 void Shell::ReportException(Isolate* isolate, Local<v8::Message> message,
2807 void Shell::ReportException(v8::Isolate* isolate, v8::TryCatch* try_catch) {
2835 void Shell::MapCounters(v8::Isolate* isolate, const char* name) {
2850 Counter* Shell::GetCounter(const char* name, bool is_histogram) {
2880 int* Shell::LookupCounter(const char* name) {
2885 void* Shell::CreateHistogram(const char* name, int min, int max,
2890 void Shell::AddHistogramSample(void* histogram, int sample) {
2896 Local<String> Shell::Stringify(Isolate* isolate, Local<Value> value) {
2917 void Shell::NodeTypeCallback(const v8::FunctionCallbackInfo<v8::Value>& args) {
2922 Local<FunctionTemplate> Shell::CreateNodeTemplates(Isolate* isolate) {
2944 Local<ObjectTemplate> Shell::CreateGlobalTemplate(Isolate* isolate) {
2973 Shell::CreateTestRunnerTemplate(isolate));
2974 global_template->Set(isolate, "Realm", Shell::CreateRealmTemplate(isolate));
2976 Shell::CreatePerformanceTemplate(isolate));
2977 global_template->Set(isolate, "Worker", Shell::CreateWorkerTemplate(isolate));
2981 global_template->Set(isolate, "os", Shell::CreateOSTemplate(isolate));
2983 global_template->Set(isolate, "d8", Shell::CreateD8Template(isolate));
2994 Shell::CreateAsyncHookTemplate(isolate));
3000 Local<ObjectTemplate> Shell::CreateOSTemplate(Isolate* isolate) {
3013 Local<FunctionTemplate> Shell::CreateWorkerTemplate(Isolate* isolate) {
3041 Local<ObjectTemplate> Shell::CreateAsyncHookTemplate(Isolate* isolate) {
3054 Local<ObjectTemplate> Shell::CreateTestRunnerTemplate(Isolate* isolate) {
3068 Local<ObjectTemplate> Shell::CreatePerformanceTemplate(Isolate* isolate) {
3078 Local<ObjectTemplate> Shell::CreateRealmTemplate(Isolate* isolate) {
3112 Local<FunctionTemplate> Shell::CreateSnapshotTemplate(Isolate* isolate) {
3118 Local<ObjectTemplate> Shell::CreateD8Template(Isolate* isolate) {
3123 FunctionTemplate::New(isolate, Shell::ReadFile));
3125 FunctionTemplate::New(isolate, Shell::ExecuteFile));
3137 dom_template->Set(isolate, "Div", Shell::CreateNodeTemplates(isolate));
3155 Shell::CreateTestFastCApiTemplate(isolate));
3157 Shell::CreateLeafInterfaceTypeTemplate(isolate));
3163 FunctionTemplate::New(isolate, Shell::InstallConditionalFeatures));
3200 Shell::ReportException(message->GetIsolate(), message, error);
3224 void Shell::PromiseRejectCallback(v8::PromiseRejectMessage data) {
3262 void Shell::Initialize(Isolate* isolate, D8Console* console,
3279 Shell::HostImportModuleDynamically);
3281 Shell::HostInitializeImportMetaObject);
3283 Shell::HostCreateShadowRealmContext);
3307 Local<String> Shell::WasmLoadSourceMapCallback(Isolate* isolate,
3309 return Shell::ReadFile(isolate, path, false).ToLocalChecked();
3312 Local<Context> Shell::CreateEvaluationContext(Isolate* isolate) {
3322 isolate->SetWasmLoadSourceMapCallback(Shell::WasmLoadSourceMapCallback);
3352 void Shell::WriteIgnitionDispatchCountersFile(v8::Isolate* isolate) {
3397 void Shell::WriteLcovData(v8::Isolate* isolate, const char* file) {
3458 void Shell::OnExit(v8::Isolate* isolate, bool dispose) {
3608 char* Shell::ReadChars(const char* name, int* size_out) {
3635 MaybeLocal<PrimitiveArray> Shell::ReadLines(Isolate* isolate,
3665 void Shell::ReadBuffer(const v8::FunctionCallbackInfo<v8::Value>& args) {
3689 MaybeLocal<String> Shell::ReadFile(Isolate* isolate, const char* name,
3716 void Shell::WriteChars(const char* name, uint8_t* buffer, size_t buffer_size) {
3723 void Shell::RunShell(Isolate* isolate) {
3734 Local<String> input = Shell::ReadFromStdin(isolate);
3939 Shell::set_script_executed();
3940 if (!Shell::ExecuteString(isolate, source, file_name, Shell::kNoPrintResult,
3941 Shell::kReportExceptions,
3942 Shell::kNoProcessMessageQueue)) {
3955 Shell::set_script_executed();
3956 if (!Shell::ExecuteString(isolate, source, file_name,
3957 Shell::kNoPrintResult, Shell::kReportExceptions,
3958 Shell::kNoProcessMessageQueue)) {
3965 Shell::set_script_executed();
3966 if (!Shell::ExecuteModule(isolate, arg)) {
3974 Shell::set_script_executed();
3975 if (!Shell::ExecuteModule(isolate, arg)) {
3983 Shell::set_script_executed();
3984 if (!Shell::ExecuteWebSnapshot(isolate, arg)) {
3992 Shell::set_script_executed();
3993 if (!Shell::LoadJSON(isolate, arg)) {
4008 if (!Shell::ReadFile(isolate, arg).ToLocal(&source)) {
4012 Shell::set_script_executed();
4013 Shell::update_script_size(source->Length());
4014 if (!Shell::ExecuteString(isolate, source, file_name, Shell::kNoPrintResult,
4015 Shell::kReportExceptions,
4016 Shell::kProcessMessageQueue)) {
4029 create_params.array_buffer_allocator = Shell::array_buffer_allocator;
4030 create_params.experimental_attach_to_shared_isolate = Shell::shared_isolate;
4032 Shell::SetWaitUntilDone(isolate, false);
4034 Shell::Initialize(isolate, &console, false);
4036 for (int i = 0; i < Shell::options.stress_runs; ++i) {
4047 Local<Context> context = Shell::CreateEvaluationContext(isolate);
4051 Shell::options.enable_inspector);
4054 Shell::CompleteMessageLoop(isolate);
4058 Shell::CollectGarbage(isolate);
4133 Shell::AddRunningWorker(std::move(worker));
4146 Shell::RemoveRunningWorker(worker);
4243 if (Shell::DeserializeValue(isolate_, std::move(data)).ToLocal(&value)) {
4265 create_params.array_buffer_allocator = Shell::array_buffer_allocator;
4266 create_params.experimental_attach_to_shared_isolate = Shell::shared_isolate;
4280 Shell::Initialize(isolate_, &console, false);
4288 Local<Context> context = Shell::CreateEvaluationContext(isolate_);
4316 if (Shell::ExecuteString(
4317 isolate_, source, file_name, Shell::kNoPrintResult,
4318 Shell::kReportExceptions, Shell::kProcessMessageQueue)) {
4333 Shell::CollectGarbage(isolate_);
4366 Shell::SerializeValue(isolate, message, transfer);
4411 bool Shell::SetOptions(int argc, char* argv[]) {
4707 int Shell::RunMain(Isolate* isolate, bool last_run) {
4764 if (Shell::unhandled_promise_rejections_.load() > 0) {
4766 Shell::unhandled_promise_rejections_.load());
4770 Shell::unhandled_promise_rejections_.store(0);
4773 if (Shell::options.no_fail) return 0;
4774 return (success == Shell::options.expected_to_throw ? 1 : 0);
4777 void Shell::CollectGarbage(Isolate* isolate) {
4792 void Shell::SetWaitUntilDone(Isolate* isolate, bool value) {
4797 void Shell::NotifyStartStreamingTask(Isolate* isolate) {
4803 void Shell::NotifyFinishStreamingTask(Isolate* isolate) {
4865 bool Shell::CompleteMessageLoop(Isolate* isolate) {
4890 bool Shell::EmptyMessageQueues(Isolate* isolate) {
4895 void Shell::PostForegroundTask(Isolate* isolate, std::unique_ptr<Task> task) {
4900 void Shell::PostBlockingBackgroundTask(std::unique_ptr<Task> task) {
4904 bool Shell::HandleUnhandledPromiseRejections(Isolate* isolate) {
4908 Shell::unhandled_promise_rejections_.store(
4909 Shell::unhandled_promise_rejections_.load() + count);
5024 reinterpret_cast<i::Isolate*>(Shell::shared_isolate));
5025 v8::Locker locker(Shell::shared_isolate);
5026 data_->shared_values_.emplace_back(Shell::shared_isolate, shared_value);
5100 v8::Locker locker(Shell::shared_isolate);
5115 reinterpret_cast<i::Isolate*>(Shell::shared_isolate));
5218 std::unique_ptr<SerializationData> Shell::SerializeValue(
5230 MaybeLocal<Value> Shell::DeserializeValue(
5238 void Shell::AddRunningWorker(std::shared_ptr<Worker> worker) {
5243 void Shell::RemoveRunningWorker(const std::shared_ptr<Worker>& worker) {
5249 void Shell::WaitForRunningWorkers() {
5278 int Shell::Main(int argc, char* argv[]) {
5392 Shell::array_buffer_allocator = &mock_arraybuffer_allocator_with_limit;
5394 Shell::array_buffer_allocator = &mock_arraybuffer_allocator;
5398 Shell::array_buffer_allocator = &multi_mapped_mock_allocator;
5401 Shell::array_buffer_allocator = &shell_array_buffer_allocator;
5403 create_params.array_buffer_allocator = Shell::array_buffer_allocator;
5411 Shell::counter_map_ = new CounterMap();
5433 shared_create_params.array_buffer_allocator = Shell::array_buffer_allocator;
5517 create_params2.array_buffer_allocator = Shell::array_buffer_allocator;
5519 Shell::shared_isolate;
5640 int main(int argc, char* argv[]) { return v8::Shell::Main(argc, argv); }