diff options
author | Matt A. Tobin <email@mattatobin.com> | 2022-05-29 00:47:25 -0500 |
---|---|---|
committer | Matt A. Tobin <email@mattatobin.com> | 2022-05-29 00:47:25 -0500 |
commit | f11b40c3ab4a5a766b0b71ab1e9a6199b23bbfeb (patch) | |
tree | 7b10fdf57c04235448662d0256ef76fa48a1d076 /js/src/builtin/Object.cpp | |
parent | 5310bcfbad6c8687d0bdbe5e49fb73858dcc1631 (diff) | |
download | aura-central-f11b40c3ab4a5a766b0b71ab1e9a6199b23bbfeb.tar.gz |
[JS:Engine] Remove the use of tagged shape pointers
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)) |