Changeset 73140 in webkit
- Timestamp:
- Dec 2, 2010 9:24:52 AM (13 years ago)
- Location:
- trunk/WebKit2
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKit2/ChangeLog
r73138 r73140 1 2010-12-02 Steve Falkenburg <sfalken@apple.com> 2 3 Reviewed by Adam Roben. 4 5 Move enableExecutionPrevention to WebKitMain 6 https://bugs.webkit.org/show_bug.cgi?id=50392 7 8 * WebProcess/WebKitMain.cpp: 9 (enableDataExecutionPrevention): 10 (WebKitMain): 11 * WebProcess/win/WebProcessMainWin.cpp: 12 (WebKit::WebProcessMain): 13 1 14 2010-12-02 Steve Falkenburg <sfalken@apple.com> 2 15 -
trunk/WebKit2/WebProcess/WebKitMain.cpp
r68173 r73140 36 36 37 37 using namespace WebKit; 38 39 static void enableDataExecutionPrevention() 40 { 41 // Enable Data Execution prevention at runtime rather than via /NXCOMPAT 42 // http://blogs.msdn.com/michael_howard/archive/2008/01/29/new-nx-apis-added-to-windows-vista-sp1-windows-xp-sp3-and-windows-server-2008.aspx 43 44 const DWORD enableDEP = 0x00000001; 45 46 HMODULE hMod = ::GetModuleHandleW(L"Kernel32.dll"); 47 if (!hMod) 48 return; 49 50 typedef BOOL (WINAPI *PSETDEP)(DWORD); 51 52 PSETDEP procSet = reinterpret_cast<PSETDEP>(::GetProcAddress(hMod, "SetProcessDEPPolicy")); 53 if (!procSet) 54 return; 55 56 // Enable Data Execution Prevention, but allow ATL thunks (for compatibility with the version of ATL that ships with the Platform SDK). 57 procSet(enableDEP); 58 } 38 59 39 60 static int WebKitMain(const CommandLine& commandLine) … … 138 159 #endif 139 160 161 enableDataExecutionPrevention(); 162 140 163 enableTerminationOnHeapCorruption(); 141 164 -
trunk/WebKit2/WebProcess/win/WebProcessMainWin.cpp
r73138 r73140 37 37 namespace WebKit { 38 38 39 static void enableDataExecutionPrevention()40 {41 // Enable Data Execution prevention at runtime rather than via /NXCOMPAT42 // http://blogs.msdn.com/michael_howard/archive/2008/01/29/new-nx-apis-added-to-windows-vista-sp1-windows-xp-sp3-and-windows-server-2008.aspx43 44 const DWORD enableDEP = 0x00000001;45 46 HMODULE hMod = ::GetModuleHandleW(L"Kernel32.dll");47 if (!hMod)48 return;49 50 typedef BOOL (WINAPI *PSETDEP)(DWORD);51 52 PSETDEP procSet = reinterpret_cast<PSETDEP>(::GetProcAddress(hMod, "SetProcessDEPPolicy"));53 if (!procSet)54 return;55 56 // Enable Data Execution Prevention, but allow ATL thunks (for compatibility with the version of ATL that ships with the Platform SDK).57 procSet(enableDEP);58 }59 60 39 #if USE(SAFARI_THEME) 61 40 #ifdef DEBUG_ALL … … 80 59 int WebProcessMain(const CommandLine& commandLine) 81 60 { 82 enableDataExecutionPrevention();83 84 61 ::OleInitialize(0); 85 62
Note: See TracChangeset
for help on using the changeset viewer.