-
Notifications
You must be signed in to change notification settings - Fork 207
Open
Labels
bugSomething isn't workingSomething isn't working
Description
In the following code snippet, the assertion fails. If out of compile code, GraalVM asserts, that the removed key has to be present.
This is strange, as the remove is usually idempotent. Besides, for the compiled code it works as expected.
try (Engine engine = Engine.newBuilder(JavaScriptLanguage.ID).build()) {
try (var context = Context
.newBuilder(JavaScriptLanguage.ID)
.engine(engine)
.allowHostAccess(HostAccess.ALL)
.allowIO(IOAccess.ALL)
.allowValueSharing(true)
.build()
) {
final Value jsSample = context.eval(Source
.newBuilder(JS, """
const sample = {p1: 23, foo: 'bar'}
sample
""", "obj-source.js")
.build()
);
jsSample.removeMember("notExistent1"); // <- Hier the exception is thrown if out of compiled code
jsSample.removeMember("notExistent2");
}
}
Can you please investigate the problem and help with this?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working