backout of changeset bdcf3b218755 (bug 518412) due to build bustage on windows

This commit is contained in:
Brad Lassey 2009-12-03 01:07:04 -05:00
Родитель f409847808
Коммит a78c97d474
1 изменённых файлов: 0 добавлений и 13 удалений

Просмотреть файл

@ -47,10 +47,6 @@
#include "nsNetCID.h"
#include "nsXPCOM.h"
#ifdef XP_WIN
#include <ole2.h>
#endif
#define NS_MOZ_DATA_FROM_PRIVATEBROWSING "application/x-moz-private-browsing"
NS_IMPL_ISUPPORTS2(nsClipboardPrivacyHandler, nsIObserver, nsISupportsWeakReference)
@ -109,14 +105,6 @@ nsClipboardPrivacyHandler::Observe(nsISupports *aSubject, char const *aTopic, PR
nsIClipboard::kGlobalClipboard,
&haveFlavors);
if (NS_SUCCEEDED(rv) && haveFlavors) {
#ifdef XP_WIN
// Workaround for bug 518412. On Windows 7 x64, there is a bug
// in handling clipboard data without any formats between
// 32-bit/64-bit boundaries, which could lead Explorer to crash.
// We work around the problem by clearing the clipboard using
// the usual Win32 API.
NS_ENSURE_TRUE(S_OK == ::OleSetClipboard(NULL), NS_ERROR_FAILURE);
#else
// Empty the native clipboard by copying an empty transferable
nsCOMPtr<nsITransferable> nullData =
do_CreateInstance("@mozilla.org/widget/transferable;1", &rv);
@ -124,7 +112,6 @@ nsClipboardPrivacyHandler::Observe(nsISupports *aSubject, char const *aTopic, PR
rv = clipboard->SetData(nullData, nsnull,
nsIClipboard::kGlobalClipboard);
NS_ENSURE_SUCCESS(rv, rv);
#endif
}
}