Bug 976258 - Undo the damage of including windows.h in IPCMessageUtils.h; r=bent

This commit is contained in:
Ehsan Akhgari 2014-03-03 21:35:51 -05:00
parent 1ee282dbfe
commit 38e78d72b1
5 changed files with 19 additions and 22 deletions

View File

@ -84,45 +84,34 @@ UNIFIED_SOURCES += [
'MouseScrollEvent.cpp',
'MutationEvent.cpp',
'NotifyAudioAvailableEvent.cpp',
'NotifyPaintEvent.cpp',
'nsAsyncDOMEvent.cpp',
'nsContentEventHandler.cpp',
'nsDOMEvent.cpp',
'nsDOMEventTargetHelper.cpp',
'nsDOMTextEvent.cpp',
'nsEventDispatcher.cpp',
'nsEventListenerManager.cpp',
'nsEventListenerService.cpp',
'nsIMEStateManager.cpp',
'nsJSEventListener.cpp',
'nsPaintRequest.cpp',
'nsPrivateTextRange.cpp',
'PointerEvent.cpp',
'ScrollAreaEvent.cpp',
'SimpleGestureEvent.cpp',
'TextComposition.cpp',
'Touch.cpp',
'TouchEvent.cpp',
'TransitionEvent.cpp',
'UIEvent.cpp',
'WheelEvent.cpp',
'XULCommandEvent.cpp',
]
# nsEventStateManager.cpp should be built separately because of Mac OS X headers.
SOURCES += [
# nsDOMEvent.cpp should be built separately because it includes
# ipc/IPCMessageUtils.h, which on Windows includes windows.h.
'NotifyPaintEvent.cpp',
# nsDOMEvent.cpp should be built separately because it includes
# ipc/IPCMessageUtils.h, which on Windows includes windows.h.
'nsDOMEvent.cpp',
# nsDOMEvent.cpp should be built separately because it includes
# mozilla/HalSensor.h, which includes ipc/IPCMessageUtils.h, which
# on Windows includes windows.h.
'nsEventListenerManager.cpp',
# nsEventStateManager.cpp should be built separately because of Mac OS X headers.
'nsEventStateManager.cpp',
# nsDOMEvent.cpp should be built separately because it includes
# ipc/IPCMessageUtils.h, which on Windows includes windows.h.
'ScrollAreaEvent.cpp',
# nsDOMEvent.cpp should be built separately because it includes
# ipc/IPCMessageUtils.h, which on Windows includes windows.h.
'UIEvent.cpp',
]
if CONFIG['MOZ_WEBSPEECH']:

View File

@ -224,7 +224,7 @@ PluginHangUIParent::Init(const nsString& aPluginName)
}
commandLine.AppendLooseValue(ipcCookie);
ScopedHandle showEvent(::CreateEvent(nullptr, FALSE, FALSE, nullptr));
ScopedHandle showEvent(::CreateEventW(nullptr, FALSE, FALSE, nullptr));
if (!showEvent.IsValid()) {
return false;
}
@ -290,7 +290,7 @@ PluginHangUIParent::UnwatchHangUIChildProcess(bool aWait)
// constructor) completionEvent
ScopedHandle completionEvent;
if (aWait) {
completionEvent.Set(::CreateEvent(nullptr, FALSE, FALSE, nullptr));
completionEvent.Set(::CreateEventW(nullptr, FALSE, FALSE, nullptr));
if (!completionEvent.IsValid()) {
return false;
}

View File

@ -303,4 +303,12 @@ class ProcessMetrics {
} // namespace base
#if defined(OS_WIN)
// Undo the windows.h damage
#undef GetMessage
#undef CreateEvent
#undef GetClassName
#undef GetBinaryType
#endif
#endif // BASE_PROCESS_UTIL_H_

View File

@ -79,11 +79,11 @@ Logging::Logging()
std::wstring event_name = GetEventName(browser_pid, true);
logging_event_on_.reset(new base::WaitableEvent(
CreateEvent(NULL, TRUE, FALSE, event_name.c_str())));
CreateEventW(NULL, TRUE, FALSE, event_name.c_str())));
event_name = GetEventName(browser_pid, false);
logging_event_off_.reset(new base::WaitableEvent(
CreateEvent(NULL, TRUE, FALSE, event_name.c_str())));
CreateEventW(NULL, TRUE, FALSE, event_name.c_str())));
RegisterWaitForEvent(true);
#endif

View File

@ -217,7 +217,7 @@ MessageChannel::MessageChannel(MessageListener *aListener)
&MessageChannel::OnMaybeDequeueOne));
#ifdef OS_WIN
mEvent = CreateEvent(nullptr, TRUE, FALSE, nullptr);
mEvent = CreateEventW(nullptr, TRUE, FALSE, nullptr);
NS_ASSERTION(mEvent, "CreateEvent failed! Nothing is going to work!");
#endif
}