From 59ae3ba236e4dfa8a178668f42616e23491d6d67 Mon Sep 17 00:00:00 2001 From: Chinmay Garde Date: Fri, 29 Mar 2019 20:53:40 -0700 Subject: [PATCH] Remove unused DartVM::IsKernelMapping (flutter/engine#8381) --- engine/src/flutter/runtime/dart_vm.cc | 20 -------------------- engine/src/flutter/runtime/dart_vm.h | 2 -- 2 files changed, 22 deletions(-) diff --git a/engine/src/flutter/runtime/dart_vm.cc b/engine/src/flutter/runtime/dart_vm.cc index b907db41bd..4c6054f7be 100644 --- a/engine/src/flutter/runtime/dart_vm.cc +++ b/engine/src/flutter/runtime/dart_vm.cc @@ -183,26 +183,6 @@ bool DartVM::IsRunningPrecompiledCode() { return Dart_IsPrecompiledRuntime(); } -bool DartVM::IsKernelMapping(const fml::FileMapping* mapping) { - if (mapping == nullptr) { - return false; - } - - const uint8_t kKernelHeaderMagic[] = {0x90, 0xAB, 0xCD, 0xEF}; - const size_t kKernelHeaderMagicSize = sizeof(kKernelHeaderMagic); - - if (mapping->GetSize() < kKernelHeaderMagicSize) { - return false; - } - - if (memcmp(kKernelHeaderMagic, mapping->GetMapping(), - kKernelHeaderMagicSize) != 0) { - return false; - } - - return true; -} - static std::vector ProfilingFlags(bool enable_profiling) { // Disable Dart's built in profiler when building a debug build. This // works around a race condition that would sometimes stop a crash's diff --git a/engine/src/flutter/runtime/dart_vm.h b/engine/src/flutter/runtime/dart_vm.h index 9a1bde888d..2c3ac0e303 100644 --- a/engine/src/flutter/runtime/dart_vm.h +++ b/engine/src/flutter/runtime/dart_vm.h @@ -38,8 +38,6 @@ class DartVM : public fml::RefCountedThreadSafe { static bool IsRunningPrecompiledCode(); - static bool IsKernelMapping(const fml::FileMapping* mapping); - const Settings& GetSettings() const; const DartSnapshot& GetVMSnapshot() const;