Bug 1313612, enable named pipe proxy support in NSPR, landing WITHOUT review, because parts of it have already been released with Firefox 52 :-( :-(
authorLiang-Heng Chen <xeonchen@mozilla.com>
Thu, 16 Mar 2017 15:30:31 +0100
changeset 4713 076df342de923c390e51cd0a9058d8f7cb6ceea1
parent 4712 271a33c4c9a40299f481ec9c151673ae5aa14605
child 4715 9c642ff6ad8e2af657baa13c53a795e17ba0985f
push id236
push userkaie@kuix.de
push dateThu, 16 Mar 2017 14:29:51 +0000
bugs1313612
Bug 1313612, enable named pipe proxy support in NSPR, landing WITHOUT review, because parts of it have already been released with Firefox 52 :-( :-(
pr/include/prio.h
pr/src/md/windows/w32poll.c
pr/src/pthreads/ptio.c
--- a/pr/include/prio.h
+++ b/pr/include/prio.h
@@ -163,17 +163,17 @@ union PRNetAddr {
     } inet;
     struct {
         PRUint16 family;                /* address family (AF_INET6) */
         PRUint16 port;                  /* port number */
         PRUint32 flowinfo;              /* routing information */
         PRIPv6Addr ip;                  /* the actual 128 bits of address */
         PRUint32 scope_id;              /* set of interfaces for a scope */
     } ipv6;
-#if defined(XP_UNIX) || defined(XP_OS2)
+#if defined(XP_UNIX) || defined(XP_OS2) || defined(XP_WIN)
     struct {                            /* Unix domain socket address */
         PRUint16 family;                /* address family (AF_UNIX) */
 #ifdef XP_OS2
         char path[108];                 /* null-terminated pathname */
                                         /* bind fails if size is not 108. */
 #else
         char path[104];                 /* null-terminated pathname */
 #endif
--- a/pr/src/md/windows/w32poll.c
+++ b/pr/src/md/windows/w32poll.c
@@ -150,17 +150,18 @@ PRInt32 _PR_MD_PR_POLL(PRPollDesc *pds, 
                 ready += 1;
                 pd->out_flags = out_flags_read | out_flags_write;
             }
             else
             {
                 pd->out_flags = 0;  /* pre-condition */
                 /* make sure this is an NSPR supported stack */
                 bottom = PR_GetIdentitiesLayer(pd->fd, PR_NSPR_IO_LAYER);
-                PR_ASSERT(NULL != bottom);  /* what to do about that? */
+                /* ignore a socket without PR_NSPR_IO_LAYER available */
+
                 if ((NULL != bottom)
                 && (_PR_FILEDESC_OPEN == bottom->secret->state))
                 {
                     if (0 == ready)
                     {
                         osfd = (SOCKET) bottom->secret->md.osfd;
                         if (in_flags_read & PR_POLL_READ)
                         {
--- a/pr/src/pthreads/ptio.c
+++ b/pr/src/pthreads/ptio.c
@@ -3851,17 +3851,18 @@ static PRInt32 _pr_poll_with_poll(
                     ready += 1;
                     pds[index].out_flags = out_flags_read | out_flags_write;
                 }
                 else
                 {
                     /* now locate the NSPR layer at the bottom of the stack */
                     PRFileDesc *bottom = PR_GetIdentitiesLayer(
                         pds[index].fd, PR_NSPR_IO_LAYER);
-                    PR_ASSERT(NULL != bottom);  /* what to do about that? */
+                    /* ignore a socket without PR_NSPR_IO_LAYER available */
+
                     pds[index].out_flags = 0;  /* pre-condition */
                     if ((NULL != bottom)
                     && (_PR_FILEDESC_OPEN == bottom->secret->state))
                     {
                         if (0 == ready)
                         {
                             syspoll[index].fd = bottom->secret->md.osfd;
                             syspoll[index].events = 0;
@@ -4109,17 +4110,18 @@ static PRInt32 _pr_poll_with_select(
                     ready += 1;
                     pds[index].out_flags = out_flags_read | out_flags_write;
                 }
                 else
                 {
                     /* now locate the NSPR layer at the bottom of the stack */
                     PRFileDesc *bottom = PR_GetIdentitiesLayer(
                         pds[index].fd, PR_NSPR_IO_LAYER);
-                    PR_ASSERT(NULL != bottom);  /* what to do about that? */
+                    /* ignore a socket without PR_NSPR_IO_LAYER available */
+
                     pds[index].out_flags = 0;  /* pre-condition */
                     if ((NULL != bottom)
                     && (_PR_FILEDESC_OPEN == bottom->secret->state))
                     {
                         if (0 == ready)
                         {
                             PRBool add_to_rd = PR_FALSE;
                             PRBool add_to_wr = PR_FALSE;