Remove unused DartVM::IsKernelMapping (flutter/engine#8381)

This commit is contained in:
Chinmay Garde
2019-03-29 20:53:40 -07:00
committed by GitHub
parent d27151607e
commit 59ae3ba236
2 changed files with 0 additions and 22 deletions

View File

@@ -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<const char*> 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

View File

@@ -38,8 +38,6 @@ class DartVM : public fml::RefCountedThreadSafe<DartVM> {
static bool IsRunningPrecompiledCode();
static bool IsKernelMapping(const fml::FileMapping* mapping);
const Settings& GetSettings() const;
const DartSnapshot& GetVMSnapshot() const;