summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorRob Findley <rfindley@google.com>2020-09-11 14:23:34 -0400
committerRob Findley <rfindley@google.com>2020-09-11 14:23:34 -0400
commitf8b1c17aced24a1618c6984794be9770c5d260be (patch)
tree45af8d39b5c3d9f43d439ebec0a2ba42b49efe70 /misc
parente5d91ab096a9ff9673311f1a7f3f860a7f9c2062 (diff)
parent07c1788357cfe6a4ee5f6f6a54d4fe9f579fa844 (diff)
downloadgo-git-dev.types.tar.gz
[dev.types] all: merge master into dev.typesdev.types
Change-Id: Ia6964cb4e09153c15cc9c5b441373d1b3cb8f757
Diffstat (limited to 'misc')
-rw-r--r--misc/cgo/test/test.go1
-rw-r--r--misc/wasm/wasm_exec.js4
2 files changed, 4 insertions, 1 deletions
diff --git a/misc/cgo/test/test.go b/misc/cgo/test/test.go
index 35bc3a1447..05fa52b381 100644
--- a/misc/cgo/test/test.go
+++ b/misc/cgo/test/test.go
@@ -319,6 +319,7 @@ typedef enum {
// issue 4339
// We've historically permitted #include <>, so test it here. Issue 29333.
+// Also see issue 41059.
#include <issue4339.h>
// issue 4417
diff --git a/misc/wasm/wasm_exec.js b/misc/wasm/wasm_exec.js
index 8501ae7cd8..ef97c4e311 100644
--- a/misc/wasm/wasm_exec.js
+++ b/misc/wasm/wasm_exec.js
@@ -11,6 +11,7 @@
// - Node.js
// - Electron
// - Parcel
+ // - Webpack
if (typeof global !== "undefined") {
// global already exists
@@ -28,7 +29,7 @@
if (!global.fs && global.require) {
const fs = require("fs");
- if (Object.keys(fs) !== 0) {
+ if (typeof fs === "object" && fs !== null && Object.keys(fs).length !== 0) {
global.fs = fs;
}
}
@@ -556,6 +557,7 @@
}
if (
+ typeof module !== "undefined" &&
global.require &&
global.require.main === module &&
global.process &&