Skip to content

Commit 6e2d041

Browse files
Guy BedfordJakeChampion
authored andcommitted
Revert "add --enable-experimental-byob-streams flag to turn the feature on"
This reverts commit dcd472a.
1 parent 2b973eb commit 6e2d041

File tree

7 files changed

+8
-17
lines changed

7 files changed

+8
-17
lines changed
Binary file not shown.

c-dependencies/js-compute-runtime/js-compute-runtime.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -115,15 +115,12 @@ bool init_js() {
115115
if (!js::UseInternalJobQueues(cx) || !JS::InitSelfHostedCode(cx))
116116
return false;
117117

118-
bool ENABLE_EXPERIMENTAL_BYOB_STREAMS =
119-
std::string(std::getenv("ENABLE_EXPERIMENTAL_BYOB_STREAMS")) == "1";
120-
121118
// TODO: check if we should set a different creation zone.
122119
JS::RealmOptions options;
123120
options.creationOptions()
124121
.setStreamsEnabled(true)
125-
.setReadableByteStreamsEnabled(ENABLE_EXPERIMENTAL_BYOB_STREAMS)
126-
.setBYOBStreamReadersEnabled(ENABLE_EXPERIMENTAL_BYOB_STREAMS)
122+
.setReadableByteStreamsEnabled(true)
123+
.setBYOBStreamReadersEnabled(true)
127124
.setReadableStreamPipeToEnabled(true)
128125
.setWritableStreamsEnabled(true)
129126
.setWeakRefsEnabled(JS::WeakRefSpecifier::EnabledWithoutCleanupSome);

integration-tests/js-compute/fixtures/byob/fastly.toml.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ name = "byob"
99
service_id = ""
1010

1111
[scripts]
12-
build = "node ../../../../js-compute-runtime-cli.js --enable-experimental-byob-streams"
12+
build = "node ../../../../js-compute-runtime-cli.js"

js-compute-runtime-cli.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { printVersion } from "./src/printVersion.js";
55
import { printHelp } from "./src/printHelp.js";
66
import { addSdkMetadataField } from "./src/addSdkMetadataField.js";
77

8-
const {enableExperimentalByobStreams, wasmEngine, input, component, output, version, help} = await parseInputs(process.argv.slice(2))
8+
const {wasmEngine, input, component, output, version, help} = await parseInputs(process.argv.slice(2))
99

1010
if (version) {
1111
await printVersion();
@@ -19,7 +19,7 @@ if (version) {
1919
// it could be that the user is using an older version of js-compute-runtime
2020
// and a newer version does support the platform they are using.
2121
const {compileApplicationToWasm} = await import('./src/compileApplicationToWasm.js')
22-
await compileApplicationToWasm(input, output, wasmEngine, enableExperimentalByobStreams);
22+
await compileApplicationToWasm(input, output, wasmEngine);
2323
if (component) {
2424
const {compileComponent} = await import('./src/component.js');
2525
await compileComponent(output);

src/compileApplicationToWasm.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { precompile } from "./precompile.js";
88
import { bundle } from "./bundle.js";
99
import { containsSyntaxErrors } from "./containsSyntaxErrors.js";
1010

11-
export async function compileApplicationToWasm(input, output, wasmEngine, enableExperimentalByobStreams = false) {
11+
export async function compileApplicationToWasm(input, output, wasmEngine) {
1212
try {
1313
if (!(await isFile(input))) {
1414
console.error(
@@ -99,7 +99,6 @@ export async function compileApplicationToWasm(input, output, wasmEngine, enable
9999
shell: true,
100100
encoding: "utf-8",
101101
env: {
102-
ENABLE_EXPERIMENTAL_BYOB_STREAMS: enableExperimentalByobStreams ? '1' : '0'
103102
}
104103
}
105104
);

src/parseInputs.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ export async function parseInputs(cliInputs) {
77
const __dirname = dirname(fileURLToPath(import.meta.url));
88

99
let component = false;
10-
let enableExperimentalByobStreams = false;
1110
let customEngineSet = false;
1211
let wasmEngine = join(__dirname, "../js-compute-runtime.wasm");
1312
let customInputSet = false;
@@ -21,10 +20,6 @@ export async function parseInputs(cliInputs) {
2120
case "--": {
2221
break loop;
2322
}
24-
case "--enable-experimental-byob-streams": {
25-
enableExperimentalByobStreams = true;
26-
break;
27-
}
2823
case "-V":
2924
case "--version": {
3025
return { version: true };
@@ -93,5 +88,5 @@ export async function parseInputs(cliInputs) {
9388
}
9489
}
9590
}
96-
return { wasmEngine, component, input, output, enableExperimentalByobStreams };
91+
return { wasmEngine, component, input, output };
9792
}

tests/wpt-harness/build-wpt-runtime.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ inputs=(
1010
)
1111

1212
cat "${inputs[@]}" > "${script_dir}/wpt-test-runner.js"
13-
node "${script_dir}/../../js-compute-runtime-cli.js" --enable-experimental-byob-streams "${script_dir}/wpt-test-runner.js" wpt-runtime.wasm
13+
node "${script_dir}/../../js-compute-runtime-cli.js" "${script_dir}/wpt-test-runner.js" wpt-runtime.wasm

0 commit comments

Comments
 (0)