diff --git a/src/org/mozilla/javascript/AbstractEcmaObjectOperations.java b/src/org/mozilla/javascript/AbstractEcmaObjectOperations.java
index b8529c2caf..0e787d9f4c 100644
--- a/src/org/mozilla/javascript/AbstractEcmaObjectOperations.java
+++ b/src/org/mozilla/javascript/AbstractEcmaObjectOperations.java
@@ -1,5 +1,11 @@
package org.mozilla.javascript;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Objects;
+import java.util.function.Predicate;
+
/**
* Abstract Object Operations as defined by EcmaScript
*
@@ -124,8 +130,9 @@ static boolean setIntegrityLevel(Context cx, Object o, INTEGRITY_LEVEL level) {
*/
ScriptableObject obj = ScriptableObject.ensureScriptableObject(o);
- // TODO check .preventExtensions() return value once implemented and act accordingly to spec
- obj.preventExtensions();
+ if (!obj.preventExtensions()) {
+ return false;
+ }
for (Object key : obj.getIds(true, true)) {
ScriptableObject desc = obj.getOwnPropertyDescriptor(cx, key);
@@ -232,4 +239,161 @@ static void put(Context cx, Scriptable o, int p, Object v, boolean isThrow) {
base.put(p, o, v);
}
}
+
+ /**
+ * CreateListFromArrayLike ( obj [ , elementTypes ] )
+ *
+ *
https://262.ecma-international.org/12.0/#sec-createlistfromarraylike
+ */
+ static List