From e6436129487d62560ae8c85e1bc62c7e053b1dd0 Mon Sep 17 00:00:00 2001 From: Matthew Dempsky Date: Thu, 18 Apr 2019 11:48:09 -0700 Subject: [PATCH] Remove unnecessary DartIO::EntropySource wrapper --- lib/io/dart_io.cc | 4 ---- lib/io/dart_io.h | 1 - runtime/dart_vm.cc | 2 +- 3 files changed, 1 insertion(+), 6 deletions(-) diff --git a/lib/io/dart_io.cc b/lib/io/dart_io.cc index b0f2f0202ae01..70dd8d1f1c630 100644 --- a/lib/io/dart_io.cc +++ b/lib/io/dart_io.cc @@ -21,8 +21,4 @@ void DartIO::InitForIsolate() { } } -bool DartIO::EntropySource(uint8_t* buffer, intptr_t length) { - return dart::bin::GetEntropy(buffer, length); -} - } // namespace flutter diff --git a/lib/io/dart_io.h b/lib/io/dart_io.h index a073a850b1f63..10fe07b514744 100644 --- a/lib/io/dart_io.h +++ b/lib/io/dart_io.h @@ -14,7 +14,6 @@ namespace flutter { class DartIO { public: static void InitForIsolate(); - static bool EntropySource(uint8_t* buffer, intptr_t length); private: FML_DISALLOW_IMPLICIT_CONSTRUCTORS(DartIO); diff --git a/runtime/dart_vm.cc b/runtime/dart_vm.cc index 973d5d8e86eb0..27261b623764a 100644 --- a/runtime/dart_vm.cc +++ b/runtime/dart_vm.cc @@ -383,7 +383,7 @@ DartVM::DartVM(std::shared_ptr vm_data, DartIsolate::DartIsolateCleanupCallback); params.thread_exit = ThreadExitCallback; params.get_service_assets = GetVMServiceAssetsArchiveCallback; - params.entropy_source = DartIO::EntropySource; + params.entropy_source = dart::bin::GetEntropy; char* init_error = Dart_Initialize(¶ms); if (init_error) { FML_LOG(FATAL) << "Error while initializing the Dart VM: " << init_error;