summaryrefslogtreecommitdiffstats
path: root/js/src/vm/Shape.cpp
diff options
context:
space:
mode:
authorGaming4JC <g4jc@hyperbola.info>2019-06-08 23:44:08 -0400
committerGaming4JC <g4jc@hyperbola.info>2019-07-18 22:38:26 -0400
commit08aee2f9d9948c9a4540706d40ea4abf01f452a5 (patch)
tree547be0da21d021593c9522e35d9cafe451d3e50d /js/src/vm/Shape.cpp
parent4c56c51c89a3229e52f4c735d236e956c6b1ab2c (diff)
downloadUXP-08aee2f9d9948c9a4540706d40ea4abf01f452a5.tar
UXP-08aee2f9d9948c9a4540706d40ea4abf01f452a5.tar.gz
UXP-08aee2f9d9948c9a4540706d40ea4abf01f452a5.tar.lz
UXP-08aee2f9d9948c9a4540706d40ea4abf01f452a5.tar.xz
UXP-08aee2f9d9948c9a4540706d40ea4abf01f452a5.zip
1320408 - Part 17: Change NativeObject::clearFlag to static method.
Diffstat (limited to 'js/src/vm/Shape.cpp')
-rw-r--r--js/src/vm/Shape.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/js/src/vm/Shape.cpp b/js/src/vm/Shape.cpp
index a574ac3b5..31cfe382c 100644
--- a/js/src/vm/Shape.cpp
+++ b/js/src/vm/Shape.cpp
@@ -1240,21 +1240,20 @@ JSObject::setFlags(ExclusiveContext* cx, HandleObject obj, BaseShape::Flag flags
return true;
}
-bool
-NativeObject::clearFlag(ExclusiveContext* cx, BaseShape::Flag flag)
+/* static */ bool
+NativeObject::clearFlag(ExclusiveContext* cx, HandleNativeObject obj, BaseShape::Flag flag)
{
- MOZ_ASSERT(inDictionaryMode());
+ MOZ_ASSERT(obj->inDictionaryMode());
- RootedNativeObject self(cx, &as<NativeObject>());
- MOZ_ASSERT(self->lastProperty()->getObjectFlags() & flag);
+ MOZ_ASSERT(obj->lastProperty()->getObjectFlags() & flag);
- StackBaseShape base(self->lastProperty());
+ StackBaseShape base(obj->lastProperty());
base.flags &= ~flag;
UnownedBaseShape* nbase = BaseShape::getUnowned(cx, base);
if (!nbase)
return false;
- self->lastProperty()->base()->adoptUnowned(nbase);
+ obj->lastProperty()->base()->adoptUnowned(nbase);
return true;
}