diff options
author | Simon Hausmann <[email protected]> | 2018-04-18 16:30:41 +0200 |
---|---|---|
committer | Simon Hausmann <[email protected]> | 2018-04-26 15:26:01 +0000 |
commit | 3934ec5671769164eb278f4a90d10e0917860c36 (patch) | |
tree | 12cdd201ea2cd13f813fb7d3b162a8c57a766d5a /src/qml/compiler/qv4compilationunitmapper_win.cpp | |
parent | 9f295f526d1280bf179a9fc17384e926fe7984b4 (diff) |
Minor V4 data structure cleanup
Remove unused flag that indicates whether a cache file contains
executable code. Since we don't embed executable code anymore we can get
rid of that along with the code that attempts to creat an executable
mapping.
Change-Id: I50e9770dc69b31319288a75379fd2f5db4c0a0f4
Reviewed-by: Lars Knoll <[email protected]>
Diffstat (limited to 'src/qml/compiler/qv4compilationunitmapper_win.cpp')
-rw-r--r-- | src/qml/compiler/qv4compilationunitmapper_win.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/qml/compiler/qv4compilationunitmapper_win.cpp b/src/qml/compiler/qv4compilationunitmapper_win.cpp index 8b000021f8..29e3e2ac01 100644 --- a/src/qml/compiler/qv4compilationunitmapper_win.cpp +++ b/src/qml/compiler/qv4compilationunitmapper_win.cpp @@ -90,14 +90,9 @@ CompiledData::Unit *CompilationUnitMapper::open(const QString &cacheFileName, co if (!header.verifyHeader(sourceTimeStamp, errorString)) return nullptr; - const uint mappingFlags = header.flags & QV4::CompiledData::Unit::ContainsMachineCode - ? PAGE_EXECUTE_READ : PAGE_READONLY; - const uint viewFlags = header.flags & QV4::CompiledData::Unit::ContainsMachineCode - ? (FILE_MAP_READ | FILE_MAP_EXECUTE) : FILE_MAP_READ; - // Data structure and qt version matched, so now we can access the rest of the file safely. - HANDLE fileMappingHandle = CreateFileMapping(handle, 0, mappingFlags, 0, 0, 0); + HANDLE fileMappingHandle = CreateFileMapping(handle, 0, PAGE_READONLY, 0, 0, 0); if (!fileMappingHandle) { *errorString = qt_error_string(GetLastError()); return nullptr; @@ -107,7 +102,7 @@ CompiledData::Unit *CompilationUnitMapper::open(const QString &cacheFileName, co CloseHandle(fileMappingHandle); }); - dataPtr = MapViewOfFile(fileMappingHandle, viewFlags, 0, 0, 0); + dataPtr = MapViewOfFile(fileMappingHandle, FILE_MAP_READ, 0, 0, 0); if (!dataPtr) { *errorString = qt_error_string(GetLastError()); return nullptr; |