Skip to content

Commit 129c1a7

Browse files
committed
Do not attempt to write a regular member when the writing of a hash entry succeeded.
1 parent 9727a86 commit 129c1a7

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

graal-js/src/com.oracle.truffle.js/src/com/oracle/truffle/js/nodes/access/PropertySetNode.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1097,6 +1097,7 @@ private boolean performWriteMember(Object truffleObject, Object value, PropertyS
10971097
if (context.getContextOptions().hasForeignHashProperties() && interop.hasHashEntries(truffleObject)) {
10981098
try {
10991099
interop.writeHashEntry(truffleObject, stringKey, value);
1100+
return true;
11001101
} catch (UnknownKeyException | UnsupportedMessageException | UnsupportedTypeException e) {
11011102
if (root.isStrict) {
11021103
errorBranch.enter();

graal-js/src/com.oracle.truffle.js/src/com/oracle/truffle/js/nodes/access/WriteElementNode.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1858,6 +1858,7 @@ protected void executeWithTargetAndIndexUnguarded(Object target, Object index, O
18581858
if (root.context.getContextOptions().hasForeignHashProperties() && interop.hasHashEntries(truffleObject)) {
18591859
try {
18601860
interop.writeHashEntry(truffleObject, propertyKey, exportedValue);
1861+
return;
18611862
} catch (UnknownKeyException | UnsupportedMessageException | UnsupportedTypeException e) {
18621863
if (root.isStrict) {
18631864
errorBranch.enter();

0 commit comments

Comments
 (0)