Bug 1304266 - Remove libevent workaround for MacOS 10.4 bug (r=dvander) a=jcristau
authorBill McCloskey <billm@mozilla.com>
Tue, 03 Jan 2017 15:24:32 -0800
changeset 353453 043b3b44cd5c8d07140588c2c614b022c4e162f8
parent 353452 726006ccf77936332f0369e1184b434e2e4444ae
child 353454 9d7e7bc831d1e9114be01a5738284fd97ddf3d76
push id6795
push userjlund@mozilla.com
push dateMon, 23 Jan 2017 14:19:46 +0000
treeherdermozilla-esr52@76101b503191 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdvander, jcristau
bugs1304266
milestone52.0a2
Bug 1304266 - Remove libevent workaround for MacOS 10.4 bug (r=dvander) a=jcristau MozReview-Commit-ID: 1U1TLlKT7aa
ipc/chromium/src/third_party/libevent/kqueue.c
--- a/ipc/chromium/src/third_party/libevent/kqueue.c
+++ b/ipc/chromium/src/third_party/libevent/kqueue.c
@@ -132,34 +132,16 @@ kq_init(struct event_base *base)
 	kqueueop->changes = mm_calloc(NEVENT, sizeof(struct kevent));
 	if (kqueueop->changes == NULL)
 		goto err;
 	kqueueop->events = mm_calloc(NEVENT, sizeof(struct kevent));
 	if (kqueueop->events == NULL)
 		goto err;
 	kqueueop->events_size = kqueueop->changes_size = NEVENT;
 
-	/* Check for Mac OS X kqueue bug. */
-	memset(&kqueueop->changes[0], 0, sizeof kqueueop->changes[0]);
-	kqueueop->changes[0].ident = -1;
-	kqueueop->changes[0].filter = EVFILT_READ;
-	kqueueop->changes[0].flags = EV_ADD;
-	/*
-	 * If kqueue works, then kevent will succeed, and it will
-	 * stick an error in events[0].  If kqueue is broken, then
-	 * kevent will fail.
-	 */
-	if (kevent(kq,
-		kqueueop->changes, 1, kqueueop->events, NEVENT, NULL) != 1 ||
-	    (int)kqueueop->events[0].ident != -1 ||
-	    kqueueop->events[0].flags != EV_ERROR) {
-		event_warn("%s: detected broken kqueue; not using.", __func__);
-		goto err;
-	}
-
 	base->evsigsel = &kqsigops;
 
 	return (kqueueop);
 err:
 	if (kqueueop)
 		kqop_free(kqueueop);
 
 	return (NULL);