summaryrefslogtreecommitdiff
path: root/js/src/builtin/Object.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/builtin/Object.cpp')
-rw-r--r--js/src/builtin/Object.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/js/src/builtin/Object.cpp b/js/src/builtin/Object.cpp
index 5221afb617..f4353480ba 100644
--- a/js/src/builtin/Object.cpp
+++ b/js/src/builtin/Object.cpp
@@ -7,6 +7,8 @@
#include "mozilla/ArrayUtils.h"
+#include "builtin/BigInt.h"
+
#include "jscntxt.h"
#include "jsstr.h"
@@ -471,6 +473,9 @@ js::obj_toString(JSContext* cx, unsigned argc, Value* vp)
case ESClass::RegExp:
builtinTag = cx->names().objectRegExp;
break;
+ case ESClass::BigInt:
+ builtinTag = cx->names().objectBigInt;
+ break;
default:
if (obj->isCallable()) {
// Non-standard: Prevent <object> from showing up as Function.
@@ -837,7 +842,9 @@ EnumerableOwnProperties(JSContext* cx, const JS::CallArgs& args, EnumerableOwnPr
if (obj->is<NativeObject>()) {
HandleNativeObject nobj = obj.as<NativeObject>();
if (JSID_IS_INT(id) && nobj->containsDenseElement(JSID_TO_INT(id))) {
- value = nobj->getDenseOrTypedArrayElement(JSID_TO_INT(id));
+ if(!nobj->getDenseOrTypedArrayElement<CanGC>(cx, JSID_TO_INT(id), &value)) {
+ return false;
+ }
} else {
shape = nobj->lookup(cx, id);
if (!shape || !(shape->attributes() & JSPROP_ENUMERATE))