Skip to content

Commit 8ddeac0

Browse files
committed
[GR-61897] Make option js.text-encoding stable and allowed in SandboxPolicy.CONSTRAINED.
PullRequest: js/3459
2 parents 19aa98e + a914db7 commit 8ddeac0

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ The main focus is on user-observable behavior of the engine.
55
Changelog may include unreleased versions.
66
See [release calendar](https://www.graalvm.org/release-calendar/) for release dates.
77

8+
## Version 25.0.0
9+
* Made option `js.text-encoding` stable and allowed in `SandboxPolicy.CONSTRAINED`.
10+
811
## Version 24.2.0
912
* Updated Node.js to version 22.13.1.
1013
* Implemented the [`Error.isError`](https://github.com/tc39/proposal-is-error) proposal. It is available in ECMAScript staging mode (`--js.ecmascript-version=staging`).

graal-js/src/com.oracle.truffle.js.test/src/com/oracle/truffle/js/test/polyglot/SandboxPolicyOptionsTest.java

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2023, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* The Universal Permissive License (UPL), Version 1.0
@@ -89,7 +89,9 @@ public static Collection<Object[]> parameters() {
8989
new Option(JSContextOptions.ALLOW_EVAL_NAME, "true", SandboxPolicy.CONSTRAINED),
9090
new Option(JSContextOptions.ALLOW_EVAL_NAME, "false", SandboxPolicy.CONSTRAINED),
9191
new Option(JSContextOptions.UNHANDLED_REJECTIONS_NAME, "none", SandboxPolicy.CONSTRAINED),
92-
new Option(JSContextOptions.UNHANDLED_REJECTIONS_NAME, "throw", SandboxPolicy.CONSTRAINED));
92+
new Option(JSContextOptions.UNHANDLED_REJECTIONS_NAME, "throw", SandboxPolicy.CONSTRAINED),
93+
new Option(JSContextOptions.TEXT_ENCODING_NAME, "true", SandboxPolicy.CONSTRAINED),
94+
new Option(JSContextOptions.TEXT_ENCODING_NAME, "false", SandboxPolicy.CONSTRAINED));
9395
return policies.stream().flatMap(p -> options.stream().map(o -> new Object[]{p, o})).toList();
9496
}
9597

graal-js/src/com.oracle.truffle.js/src/com/oracle/truffle/js/runtime/JSContextOptions.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -721,7 +721,7 @@ public String apply(String name) {
721721
@CompilationFinal private short frequencyBasedPropertyCacheLimit;
722722

723723
public static final String TEXT_ENCODING_NAME = JS_OPTION_PREFIX + "text-encoding";
724-
@Option(name = TEXT_ENCODING_NAME, category = OptionCategory.EXPERT, help = "Enable TextDecoder and TextEncoder Web APIs.") //
724+
@Option(name = TEXT_ENCODING_NAME, category = OptionCategory.USER, stability = OptionStability.STABLE, sandbox = SandboxPolicy.CONSTRAINED, help = "Enable TextDecoder and TextEncoder Web APIs.") //
725725
public static final OptionKey<Boolean> TEXT_ENCODING = new OptionKey<>(false);
726726
@CompilationFinal private boolean textEncoding;
727727

0 commit comments

Comments
 (0)