$OpenBSD$ index 6aebebe..3264772 100644 --- dom/plugins/ipc/PluginProcessChild.cpp.orig Fri Feb 20 15:40:37 2015 +++ dom/plugins/ipc/PluginProcessChild.cpp Fri Feb 20 15:40:37 2015 @@ -13,6 +13,13 @@ #include "base/string_util.h" #include "chrome/common/chrome_switches.h" +#if defined(XP_MACOSX) +#include "nsCocoaFeatures.h" +// An undocumented CoreGraphics framework method, present in the same form +// since at least OS X 10.5. +extern "C" CGError CGSSetDebugOptions(int options); +#endif + #ifdef XP_WIN #include bool ShouldProtectPluginCurrentDirectory(char16ptr_t pluginFilePath); @@ -119,9 +126,21 @@ PluginProcessChild::Init() return false; } - return mPlugin.Init(pluginFilename, ParentHandle(), - IOThreadChild::message_loop(), - IOThreadChild::channel()); + bool retval = mPlugin.Init(pluginFilename, ParentHandle(), + IOThreadChild::message_loop(), + IOThreadChild::channel()); +#if defined(XP_MACOSX) + if (nsCocoaFeatures::OnYosemiteOrLater()) { + // Explicitly turn off CGEvent logging. This works around bug 1092855. + // If there are already CGEvents in the log, turning off logging also + // causes those events to be written to disk. But at this point no + // CGEvents have yet been processed. CGEvents are events (usually + // input events) pulled from the WindowServer. An option of 0x80000008 + // turns on CGEvent logging. + CGSSetDebugOptions(0x80000007); + } +#endif + return retval; } void