Bug 1313612, enable named pipe proxy support in NSPR, landing WITHOUT review, because parts of it have already been released with Firefox 52 :-( :-( NSPR_4_14_BRANCH NSPR_4_14_BETA1
authorLiang-Heng Chen <xeonchen@mozilla.com>
Thu, 16 Mar 2017 15:30:31 +0100
branchNSPR_4_14_BRANCH
changeset 4717 5c664c77bf572b64cc172fce8f3f8e25dc50a488
parent 4716 643558f3ac5b19d852d7b5948424a6f34def6157
child 4718 fc38b7a0b4c58aef48fe0f70a849fc83e627d96d
push id239
push userkaie@kuix.de
push dateThu, 16 Mar 2017 16:04:36 +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
@@ -3843,17 +3843,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;
@@ -4101,17 +4102,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;