all: re-adjust build constraints for JS and NaCl

This change fixes the build breakage of h2i on JS and NaCl, and avoids
using unintentional code path on JS.

Change-Id: Ib08f0f6d1d79aecc9bf1e9ee7de52b0a57c22baf
Reviewed-on: https://go-review.googlesource.com/122539
Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
diff --git a/http2/h2i/h2i.go b/http2/h2i/h2i.go
index 62e5752..12d325e 100644
--- a/http2/h2i/h2i.go
+++ b/http2/h2i/h2i.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build !plan9,!solaris
+// +build !js,!nacl,!plan9,!solaris
 
 /*
 The h2i command is an interactive HTTP/2 console.
diff --git a/internal/nettest/helper_stub.go b/internal/nettest/helper_stub.go
index d729156..d89cf29 100644
--- a/internal/nettest/helper_stub.go
+++ b/internal/nettest/helper_stub.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build js,wasm nacl plan9
+// +build js nacl plan9
 
 package nettest
 
diff --git a/ipv4/payload_cmsg.go b/ipv4/payload_cmsg.go
index eec520c..204a49f 100644
--- a/ipv4/payload_cmsg.go
+++ b/ipv4/payload_cmsg.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build !nacl,!plan9,!windows
+// +build !js,!nacl,!plan9,!windows
 
 package ipv4
 
diff --git a/ipv4/payload_cmsg_go1_8.go b/ipv4/payload_cmsg_go1_8.go
index d26ccd9..8d45599 100644
--- a/ipv4/payload_cmsg_go1_8.go
+++ b/ipv4/payload_cmsg_go1_8.go
@@ -3,7 +3,7 @@
 // license that can be found in the LICENSE file.
 
 // +build !go1.9
-// +build !nacl,!plan9,!windows
+// +build !js,!nacl,!plan9,!windows
 
 package ipv4
 
diff --git a/ipv4/payload_cmsg_go1_9.go b/ipv4/payload_cmsg_go1_9.go
index 2f19311..4081aad 100644
--- a/ipv4/payload_cmsg_go1_9.go
+++ b/ipv4/payload_cmsg_go1_9.go
@@ -3,7 +3,7 @@
 // license that can be found in the LICENSE file.
 
 // +build go1.9
-// +build !nacl,!plan9,!windows
+// +build !js,!nacl,!plan9,!windows
 
 package ipv4
 
diff --git a/ipv4/payload_nocmsg.go b/ipv4/payload_nocmsg.go
index 8cb21b3..1d434c6 100644
--- a/ipv4/payload_nocmsg.go
+++ b/ipv4/payload_nocmsg.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build nacl plan9 windows
+// +build js nacl plan9 windows
 
 package ipv4
 
diff --git a/ipv6/payload_cmsg.go b/ipv6/payload_cmsg.go
index b7ccdbd..3f23b5d 100644
--- a/ipv6/payload_cmsg.go
+++ b/ipv6/payload_cmsg.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build !nacl,!plan9,!windows
+// +build !js,!nacl,!plan9,!windows
 
 package ipv6
 
diff --git a/ipv6/payload_cmsg_go1_8.go b/ipv6/payload_cmsg_go1_8.go
index fdc6c39..bc4209d 100644
--- a/ipv6/payload_cmsg_go1_8.go
+++ b/ipv6/payload_cmsg_go1_8.go
@@ -3,7 +3,7 @@
 // license that can be found in the LICENSE file.
 
 // +build !go1.9
-// +build !nacl,!plan9,!windows
+// +build !js,!nacl,!plan9,!windows
 
 package ipv6
 
diff --git a/ipv6/payload_cmsg_go1_9.go b/ipv6/payload_cmsg_go1_9.go
index 8f6d02e..7dd6504 100644
--- a/ipv6/payload_cmsg_go1_9.go
+++ b/ipv6/payload_cmsg_go1_9.go
@@ -3,7 +3,7 @@
 // license that can be found in the LICENSE file.
 
 // +build go1.9
-// +build !nacl,!plan9,!windows
+// +build !js,!nacl,!plan9,!windows
 
 package ipv6
 
diff --git a/ipv6/payload_nocmsg.go b/ipv6/payload_nocmsg.go
index 8358507..459142d 100644
--- a/ipv6/payload_nocmsg.go
+++ b/ipv6/payload_nocmsg.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build nacl plan9 windows
+// +build js nacl plan9 windows
 
 package ipv6