diff options
author | Matt A. Tobin <email@mattatobin.com> | 2022-06-07 20:20:19 -0500 |
---|---|---|
committer | Matt A. Tobin <email@mattatobin.com> | 2022-06-07 20:20:19 -0500 |
commit | 878ab758d5d4c1ef7badf2bc20ebc7c67dc2165b (patch) | |
tree | 3683d6df35e3618c0e7b456de7c749ca4c8c21a6 /js/src/builtin/Object.cpp | |
parent | a621951327b0c19c0c24dfd9fd973f7bd13ae68f (diff) | |
parent | cfb9884423faf741de03c5fcc72bf9ac8c6ada4d (diff) | |
download | aura-central-878ab758d5d4c1ef7badf2bc20ebc7c67dc2165b.tar.gz |
Merge branch 'TRUNK' into ARE-5.0
Diffstat (limited to 'js/src/builtin/Object.cpp')
-rw-r--r-- | js/src/builtin/Object.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/js/src/builtin/Object.cpp b/js/src/builtin/Object.cpp index 1221d2daf..d661a222e 100644 --- a/js/src/builtin/Object.cpp +++ b/js/src/builtin/Object.cpp @@ -69,18 +69,18 @@ js::obj_propertyIsEnumerable(JSContext* cx, unsigned argc, Value* vp) JSObject* obj = &args.thisv().toObject(); /* Step 3. */ - Shape* shape; + PropertyResult prop; if (obj->isNative() && - NativeLookupOwnProperty<NoGC>(cx, &obj->as<NativeObject>(), id, &shape)) + NativeLookupOwnProperty<NoGC>(cx, &obj->as<NativeObject>(), id, &prop)) { /* Step 4. */ - if (!shape) { + if (!prop) { args.rval().setBoolean(false); return true; } /* Step 5. */ - unsigned attrs = GetShapeAttributes(obj, shape); + unsigned attrs = GetPropertyAttributes(obj, prop); args.rval().setBoolean((attrs & JSPROP_ENUMERATE) != 0); return true; } @@ -582,11 +582,11 @@ js::obj_hasOwnProperty(JSContext* cx, unsigned argc, Value* vp) jsid id; if (args.thisv().isObject() && ValueToId<NoGC>(cx, idValue, &id)) { JSObject* obj = &args.thisv().toObject(); - Shape* prop; + PropertyResult prop; if (obj->isNative() && NativeLookupOwnProperty<NoGC>(cx, &obj->as<NativeObject>(), id, &prop)) { - args.rval().setBoolean(!!prop); + args.rval().setBoolean(prop.isFound()); return true; } } @@ -839,7 +839,7 @@ EnumerableOwnProperties(JSContext* cx, const JS::CallArgs& args, EnumerableOwnPr value = nobj->getDenseOrTypedArrayElement(JSID_TO_INT(id)); } else { shape = nobj->lookup(cx, id); - if (!shape || !(GetShapeAttributes(nobj, shape) & JSPROP_ENUMERATE)) + if (!shape || !(shape->attributes() & JSPROP_ENUMERATE)) continue; if (!shape->isAccessorShape()) { if (!NativeGetExistingProperty(cx, nobj, nobj, shape, &value)) |