[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
jberlin at webkit.org
jberlin at webkit.org
Wed Dec 22 13:25:07 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit fc18c4d1f5a4d061c2dba312f60ab4dbf0803b1c
Author: jberlin at webkit.org <jberlin at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Sep 14 22:00:54 2010 +0000
2010-09-14 Jessie Berlin <jberlin at apple.com>
Reviewed by Adam Roben.
Exceptions are getting ignored on 64-bit Windows in the Web Process
https://bugs.webkit.org/show_bug.cgi?id=45779
WebKit2:
* WebProcess/WebKitMain.cpp:
(disableProcessCallbackFilterForExceptions):
Clear the PROCESS_CALLBACK_FILTER_ENABLED flag so that exceptions thrown in callback routines
are not ignored, as described in http://support.microsoft.com/kb/976038 and
http://blog.paulbetts.org/index.php/2010/07/20/the-case-of-the-disappearing-onload-exception-user-mode-callback-exceptions-in-x64/.
(WebKitMain):
WebKitSite:
* building/tools.html:
Add instructions about how to optionally get hotfix 976038.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@67501 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index 7b35f47..cf13b5a 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -1,3 +1,17 @@
+2010-09-14 Jessie Berlin <jberlin at apple.com>
+
+ Reviewed by Adam Roben.
+
+ Exceptions are getting ignored on 64-bit Windows in the Web Process
+ https://bugs.webkit.org/show_bug.cgi?id=45779
+
+ * WebProcess/WebKitMain.cpp:
+ (disableProcessCallbackFilterForExceptions):
+ Clear the PROCESS_CALLBACK_FILTER_ENABLED flag so that exceptions thrown in callback routines
+ are not ignored, as described in http://support.microsoft.com/kb/976038 and
+ http://blog.paulbetts.org/index.php/2010/07/20/the-case-of-the-disappearing-onload-exception-user-mode-callback-exceptions-in-x64/.
+ (WebKitMain):
+
2010-09-14 Brent Fulgham <bfulgham at webkit.org>
Build correction, no review.
diff --git a/WebKit2/WebProcess/WebKitMain.cpp b/WebKit2/WebProcess/WebKitMain.cpp
index d7635c8..bc0f04e 100644
--- a/WebKit2/WebProcess/WebKitMain.cpp
+++ b/WebKit2/WebProcess/WebKitMain.cpp
@@ -79,6 +79,34 @@ static void enableTerminationOnHeapCorruption()
heapSetInformation(0, heapEnableTerminationOnCorruption, 0, 0);
}
+static void disableUserModeCallbackExceptionFilter()
+{
+ const DWORD PROCESS_CALLBACK_FILTER_ENABLED = 0x1;
+ typedef BOOL (NTAPI *getProcessUserModeExceptionPolicyPtr)(LPDWORD lpFlags);
+ typedef BOOL (NTAPI *setProcessUserModeExceptionPolicyPtr)(DWORD dwFlags);
+
+ HMODULE lib = LoadLibrary(TEXT("kernel32.dll"));
+ ASSERT(lib);
+
+ getProcessUserModeExceptionPolicyPtr getPolicyPtr = (getProcessUserModeExceptionPolicyPtr)GetProcAddress(lib, "GetProcessUserModeExceptionPolicy");
+ setProcessUserModeExceptionPolicyPtr setPolicyPtr = (setProcessUserModeExceptionPolicyPtr)GetProcAddress(lib, "SetProcessUserModeExceptionPolicy");
+
+ DWORD dwFlags;
+ if (!getPolicyPtr || !setPolicyPtr || !getPolicyPtr(&dwFlags)) {
+ FreeLibrary(lib);
+ return;
+ }
+
+ // If this flag isn't cleared, exceptions that are thrown when running in a 64-bit version of
+ // Windows are ignored, possibly leaving Safari in an inconsistent state that could cause an
+ // unrelated exception to be thrown.
+ // http://support.microsoft.com/kb/976038
+ // http://blog.paulbetts.org/index.php/2010/07/20/the-case-of-the-disappearing-onload-exception-user-mode-callback-exceptions-in-x64/
+ setPolicyPtr(dwFlags & ~PROCESS_CALLBACK_FILTER_ENABLED);
+
+ FreeLibrary(lib);
+}
+
extern "C" __declspec(dllexport)
int WebKitMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpstrCmdLine, int nCmdShow)
{
@@ -92,6 +120,8 @@ int WebKitMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpstrCmdLine
enableTerminationOnHeapCorruption();
+ disableUserModeCallbackExceptionFilter();
+
CommandLine commandLine;
if (!commandLine.parse(lpstrCmdLine))
return EXIT_FAILURE;
diff --git a/WebKitSite/ChangeLog b/WebKitSite/ChangeLog
index 33a3d21..19f66c9 100644
--- a/WebKitSite/ChangeLog
+++ b/WebKitSite/ChangeLog
@@ -1,3 +1,13 @@
+2010-09-14 Jessie Berlin <jberlin at apple.com>
+
+ Reviewed by Adam Roben.
+
+ Exceptions are getting ignored on 64-bit Windows in the Web Process.
+ https://bugs.webkit.org/show_bug.cgi?id=45779
+
+ * building/tools.html:
+ Add instructions about how to optionally get hotfix 976038.
+
2010-09-06 Robin Qiu <robin.qiu at torchmobile.com.cn>
Reviewed by Adam Barth.
diff --git a/WebKitSite/building/tools.html b/WebKitSite/building/tools.html
index d01cd72..046a864 100644
--- a/WebKitSite/building/tools.html
+++ b/WebKitSite/building/tools.html
@@ -60,6 +60,8 @@ Keep all the default options and click <b>Next</b> until the file is extracted a
<li><p>Optional: Install the 32-bit version of Debugging Tools for Windows</p>
<p>Debugging Tools for Windows includes many useful debugging tools such as WinDbg and NTSD. Some of WebKit’s tests and scripts use these tools. Follow the <a target="installtools" href="http://www.microsoft.com/whdc/devtools/debugging/installx86.mspx#b">instructions for installing the 32-bit version of Debugging Tools for Windows</a>.</p>
+<li><p>Optional: Hotfix for 64-bit Windows to disable the user-mode callback filter for exceptions</p>
+<p>Without the <a href="http://support.microsoft.com/kb/976038">976038 hotfix</a>, exceptions may be thrown in callback routines that do not cause a crash but leave the application in an inconsistent state that might cause a crash later. You will need to click on "View and request hotfix downloads" and fill out the form. A link to download the hotfix and a password will be emailed to you.</p>
</ol>
</div>
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list