Skip to content

Commit c697a84

Browse files
committed
add comment about disabling js.java-package-globals at a later time
1 parent 6481be4 commit c697a84

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/main/java/org/openstreetmap/josm/plugins/scripting/graalvm/GraalVMFacade.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,19 @@ private void grantPrivilegesToContext(final Context.Builder builder) {
5959
}
6060

6161
private void setOptionsOnContext(final Context.Builder builder) {
62+
// Enable strict mode for all scripts.
6263
builder.option("js.strict", "true");
64+
65+
// TODO(Gubaer): disable later. Currently js.java-package-globals is
66+
// an experimental option and experimental options should not be
67+
// used in production environments.
68+
// ---
69+
// Don't support the global variable 'Packages'. Don't allow java
70+
// classes with the backward-compatible notation
71+
// const FileClass = java.io.File
72+
// See
73+
// https://www.graalvm.org/22.1/reference-manual/js/JavaInteroperability/#class-access
74+
// builder.option("js.java-package-globals", "false");
6375
}
6476

6577
/**

0 commit comments

Comments
 (0)