[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-10851-g50815da

sfalken at apple.com sfalken at apple.com
Wed Dec 22 17:54:47 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 1393dd34c3cca295e84830d07c199b2336148d78
Author: sfalken at apple.com <sfalken at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Dec 2 17:10:29 2010 +0000

    2010-12-02  Steve Falkenburg  <sfalken at apple.com>
    
            Reviewed by Adam Roben.
    
            Enable DEP at runtime to allow for compatibility with older versions of ATL
            https://bugs.webkit.org/show_bug.cgi?id=50378
    
            * WebProcess/win/WebProcessMainWin.cpp:
            (WebKit::enableDataExecutionPrevention):
            (WebKit::WebProcessMain):
            * win/WebKit2WebProcessCommon.vsprops:
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@73138 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index d19f979..8e52754 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -1,3 +1,15 @@
+2010-12-02  Steve Falkenburg  <sfalken at apple.com>
+
+        Reviewed by Adam Roben.
+
+        Enable DEP at runtime to allow for compatibility with older versions of ATL
+        https://bugs.webkit.org/show_bug.cgi?id=50378
+
+        * WebProcess/win/WebProcessMainWin.cpp:
+        (WebKit::enableDataExecutionPrevention):
+        (WebKit::WebProcessMain):
+        * win/WebKit2WebProcessCommon.vsprops:
+
 2010-12-01  Sam Weinig  <sam at webkit.org>
 
         Fix 64-bit build.
diff --git a/WebKit2/WebProcess/win/WebProcessMainWin.cpp b/WebKit2/WebProcess/win/WebProcessMainWin.cpp
index 944d8ff..b8eaf2f 100644
--- a/WebKit2/WebProcess/win/WebProcessMainWin.cpp
+++ b/WebKit2/WebProcess/win/WebProcessMainWin.cpp
@@ -36,6 +36,27 @@
 
 namespace WebKit {
 
+static void enableDataExecutionPrevention()
+{
+    // Enable Data Execution prevention at runtime rather than via /NXCOMPAT
+    // 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
+
+    const DWORD enableDEP = 0x00000001;
+
+    HMODULE hMod = ::GetModuleHandleW(L"Kernel32.dll");
+    if (!hMod)
+        return;
+
+    typedef BOOL (WINAPI *PSETDEP)(DWORD);
+
+    PSETDEP procSet = reinterpret_cast<PSETDEP>(::GetProcAddress(hMod, "SetProcessDEPPolicy"));
+    if (!procSet)
+        return;
+
+    // Enable Data Execution Prevention, but allow ATL thunks (for compatibility with the version of ATL that ships with the Platform SDK).
+    procSet(enableDEP);
+}
+
 #if USE(SAFARI_THEME)
 #ifdef DEBUG_ALL
 SOFT_LINK_DEBUG_LIBRARY(SafariTheme)
@@ -58,6 +79,8 @@ static void initializeSafariTheme()
 
 int WebProcessMain(const CommandLine& commandLine)
 {
+    enableDataExecutionPrevention();
+
     ::OleInitialize(0);
 
 #if USE(SAFARI_THEME)
diff --git a/WebKit2/win/WebKit2WebProcessCommon.vsprops b/WebKit2/win/WebKit2WebProcessCommon.vsprops
index 4482cfd..4a79706 100644
--- a/WebKit2/win/WebKit2WebProcessCommon.vsprops
+++ b/WebKit2/win/WebKit2WebProcessCommon.vsprops
@@ -11,6 +11,5 @@
 	<Tool
 		Name="VCLinkerTool"
 		AdditionalDependencies="WebKit$(WebKitDLLConfigSuffix).lib"
-		AdditionalOptions="/NXCOMPAT"
 	/>
 </VisualStudioPropertySheet>

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list