Skip to content

Commit 38ec350

Browse files
committed
Make JSDynamicObject a sealed class.
1 parent cd53d20 commit 38ec350

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

graal-js/src/com.oracle.truffle.js/src/com/oracle/truffle/js/runtime/objects/JSDynamicObject.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2018, 2022, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2018, 2024, 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
@@ -72,7 +72,7 @@
7272
* The common base class for all JavaScript objects as well as {@code null} and {@code undefined}.
7373
*/
7474
@ExportLibrary(InteropLibrary.class)
75-
public abstract class JSDynamicObject extends DynamicObject implements TruffleObject {
75+
public abstract sealed class JSDynamicObject extends DynamicObject implements TruffleObject permits JSObject, Nullish {
7676

7777
protected JSDynamicObject(Shape shape) {
7878
super(shape);

graal-js/src/com.oracle.truffle.js/src/com/oracle/truffle/js/runtime/objects/JSObject.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2018, 2024, 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
@@ -95,7 +95,7 @@
9595
* Includes static methods for dealing with JS objects (internal methods).
9696
*/
9797
@ExportLibrary(InteropLibrary.class)
98-
public abstract class JSObject extends JSDynamicObject {
98+
public abstract non-sealed class JSObject extends JSDynamicObject {
9999

100100
public static final TruffleString CONSTRUCTOR = Strings.constant("constructor");
101101
public static final TruffleString PROTOTYPE = Strings.constant("prototype");

0 commit comments

Comments
 (0)