]> Cypherpunks repositories - gostls13.git/commit
net/http: only disable Fetch API in tests
authorDmitri Shuralyov <dmitshur@golang.org>
Thu, 15 Jun 2023 06:08:47 +0000 (02:08 -0400)
committerGopher Robot <gobot@golang.org>
Thu, 15 Jun 2023 21:14:46 +0000 (21:14 +0000)
commit30b17f4f97d37f654c5090001c5b44c331b00d0c
tree22146657d53ba1fc4206fefe2447fa05d8aebdce
parent65db95d0ed69b047b54b2dea28406b2764a62bbe
net/http: only disable Fetch API in tests

The Fetch API was meant to only be disabled in tests.
Since wasm_exec.js defines a global 'process' object,
it ended up being disabled anywhere that script is used.

Make the heuristic stricter so that it's less likely to
trigger anywhere but when testing js/wasm using Node.js.

For #57613.
Fixes #60808.

Change-Id: Ief8def802b466ef4faad16daccefcfd72e4398b8
Reviewed-on: https://go-review.googlesource.com/c/go/+/503675
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Johan Brandhorst-Satzkorn <johan.brandhorst@gmail.com>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Damien Neil <dneil@google.com>
src/net/http/roundtrip_js.go