Skip to content
Permalink
Browse files

Bug 1395919 - Don't copy the unknown-properties flag in AddPropertyTy…

…pesAfterProtoChange. r=bhackett
  • Loading branch information...
jandem committed Sep 7, 2017
1 parent af505f8 commit 1c43dd975e76c0aa7e5a84af36844d247baf671a
Showing with 5 additions and 1 deletion.
  1. +2 −1 js/src/vm/NativeObject.cpp
  2. +3 −0 js/src/vm/TypeInference.cpp
@@ -1289,7 +1289,8 @@ js::AddPropertyTypesAfterProtoChange(JSContext* cx, NativeObject* obj, ObjectGro
MOZ_ASSERT(!obj->group()->unknownProperties());

// First copy the dynamic flags.
MarkObjectGroupFlags(cx, obj, oldGroup->flags() & OBJECT_FLAG_DYNAMIC_MASK);
MarkObjectGroupFlags(cx, obj, oldGroup->flags() &
(OBJECT_FLAG_DYNAMIC_MASK & ~OBJECT_FLAG_UNKNOWN_PROPERTIES));

// Now update all property types. If the object has many properties, this
// function may be slow so we mark all properties as unknown.
@@ -2902,6 +2902,9 @@ ObjectGroup::markStateChange(JSContext* cx)
void
ObjectGroup::setFlags(JSContext* cx, ObjectGroupFlags flags)
{
MOZ_ASSERT(!(flags & OBJECT_FLAG_UNKNOWN_PROPERTIES),
"Should use markUnknown to set unknownProperties");

if (hasAllFlags(flags))
return;

0 comments on commit 1c43dd9

Please sign in to comment.
You can’t perform that action at this time.