mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-06 00:55:37 +00:00
Bug 1002737 - Assert more about PropDesc definedness in various functions. (r=jorendorff)
This commit is contained in:
parent
42141896c8
commit
ec2494e5cc
@ -275,6 +275,8 @@ js::NewPropertyDescriptorObject(JSContext *cx, Handle<PropertyDescriptor> desc,
|
||||
void
|
||||
PropDesc::initFromPropertyDescriptor(Handle<PropertyDescriptor> desc)
|
||||
{
|
||||
MOZ_ASSERT(isUndefined());
|
||||
|
||||
isUndefined_ = false;
|
||||
descObj_ = nullptr;
|
||||
attrs = uint8_t(desc.attributes());
|
||||
@ -433,6 +435,8 @@ HasProperty(JSContext *cx, HandleObject obj, HandleId id, MutableHandleValue vp,
|
||||
bool
|
||||
PropDesc::initialize(JSContext *cx, const Value &origval, bool checkAccessors)
|
||||
{
|
||||
MOZ_ASSERT(isUndefined());
|
||||
|
||||
RootedValue v(cx, origval);
|
||||
|
||||
/* 8.10.5 step 1 */
|
||||
@ -535,6 +539,8 @@ PropDesc::initialize(JSContext *cx, const Value &origval, bool checkAccessors)
|
||||
void
|
||||
PropDesc::complete()
|
||||
{
|
||||
MOZ_ASSERT(!isUndefined());
|
||||
|
||||
if (isGenericDescriptor() || isDataDescriptor()) {
|
||||
if (!hasValue_) {
|
||||
hasValue_ = true;
|
||||
|
Loading…
Reference in New Issue
Block a user