Fix Deprecation Warnings (#1187)

This commit is contained in:
Mitchell Syer
2024-12-07 14:13:06 -05:00
committed by GitHub
parent 3eabbc9770
commit 088552bf56
5 changed files with 13 additions and 13 deletions

View File

@@ -88,11 +88,12 @@ public final class QuickJs implements Closeable {
context.getBindings("js").putMember(name, object);
}
@Override
public void close() {
this.context.leave();
this.context.close();
this.context = null;
if (this.context != null) {
this.context.leave();
this.context.close();
this.context = null;
}
}
}